diff options
author | Benedikt Boehm <hollow@gentoo.org> | 2006-12-20 12:33:59 +0000 |
---|---|---|
committer | Benedikt Boehm <hollow@gentoo.org> | 2006-12-20 12:33:59 +0000 |
commit | 20df85bb4a97cb07b922021c64d63edf01875f71 (patch) | |
tree | d3e60e2b85955aa65804e89eb23c06e17886d6b8 | |
parent | updates (diff) | |
download | misc-20df85bb4a97cb07b922021c64d63edf01875f71.tar.gz misc-20df85bb4a97cb07b922021c64d63edf01875f71.tar.bz2 misc-20df85bb4a97cb07b922021c64d63edf01875f71.zip |
everything is in upstream now, no more patch tarballs, yay
svn path=/; revision=533
293 files changed, 0 insertions, 28727 deletions
diff --git a/util-vserver/conf.d/vservers b/util-vserver/conf.d/vservers deleted file mode 100644 index 15e25c5..0000000 --- a/util-vserver/conf.d/vservers +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -# A space-delimited list of vserver MARKS to start. -# Identification of vservers happens by -# putting the flavor into /etc/vservers/<vserver-id>/apps/init/mark. -# Note: on stop the init script will stop ALL running vservers -MARKS="default" - -# A space-delimited list of vservers to start -# This can be used together with MARKS or as a replacement -# Note: on stop the init script will stop ALL running vservers -#START_VSERVERS="" - -# Wether to start all vserver MARKS by default (supersedes MARKS) -# This will be enabled if STARTALL is set regardless of its content -# i.e. you have to comment to disable it -# Note: on stop the init script will stop ALL running vservers -#STARTALL=yes - -# Number of vservers which shall be started in parallel; since most -# initmethods are spending much time in sleeps, it is safe to -# use a high number here, though you should pay attention if you make -# use of depends in /etc/vservers as some services may not be up if -# started in parallel -#NUMPARALLEL=6 - -# The name of the vserver lock directory which is used by the init script -# to determine which MARKS have already been started (used within -# vstatus() to show the status of MARKS). Default should be good -# for everyone. Change at your own risk -#LOCKDIR=/var/lock/vservers - -# The location of util-vserver-vars -# This file contains variables to util-vserver scripts used within the -# init script. Change at your own risk. -#UTIL_VSERVER_VARS=/usr/lib/util-vserver/util-vserver-vars diff --git a/util-vserver/init.d/vprocunhide b/util-vserver/init.d/vprocunhide deleted file mode 100755 index d7199ca..0000000 --- a/util-vserver/init.d/vprocunhide +++ /dev/null @@ -1,20 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -start() { - : ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} - if [[ ! -e ${UTIL_VSERVER_VARS} ]]; then - eerror "Cannot find util-vserver installation" - eerror "(the file '$UTIL_VSERVER_VARS' would be expected)" - return 1 - fi - - source ${UTIL_VSERVER_VARS} - - ebegin "Fixing /proc entries visibility" - ${_VPROCUNHIDE} - eend $? -} - -# vim:ts=4:filetype=gentoo-init-d diff --git a/util-vserver/init.d/vservers.default b/util-vserver/init.d/vservers.default deleted file mode 100755 index 52eb322..0000000 --- a/util-vserver/init.d/vservers.default +++ /dev/null @@ -1,15 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -start() { - MARK=${0##*/vserver.} /usr/lib/util-vserver/vserver-wrapper start -} - -stop() { - MARK=${0##*/vserver.} /usr/lib/util-vserver/vserver-wrapper stop -} - - - -# vim:ts=4:filetype=gentoo-init-d diff --git a/util-vserver/mkrelease b/util-vserver/mkrelease deleted file mode 100755 index b89151f..0000000 --- a/util-vserver/mkrelease +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -# Package name convention for util-vserver patches -# util-vserver-patches-${PVR}.tar.bz2 -# where -# PVR is the package version + revision (i.e. 2.0.1-r1) - -if [ -z $1 ]; then - echo "Usage: mkrelease <ver> [<rev>]" - exit 1 -fi - -PVR=${1} - -[[ -n ${2} ]] && PVR=${1}-${2} - -P="util-vserver-patches-${PVR}.tar.bz2" - -tmpdir=$(mktemp -du) - -svn export . ${tmpdir} - -pushd ${tmpdir} >/dev/null -pushd patches >/dev/null - -for dir in *; do - [ "${dir}" == "${PVR}" ] && mv ${dir}/* . - rm -rf "${dir}" -done - -popd >/dev/null - -rm -f mkrelease - -popd >/dev/null - -tar cjvf ./${P} -C ${tmpdir} . | sort - -rm -rf ${tmpdir} - -echo "Tarball is at ./${P}" diff --git a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-fix-lockfile.c.patch b/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-fix-lockfile.c.patch deleted file mode 100644 index 71b6556..0000000 --- a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-fix-lockfile.c.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -NurpP util-vserver-0.30.208/src/lockfile.c util-vserver-0.30.208-lockfix/src/lockfile.c ---- util-vserver-0.30.208/src/lockfile.c 2004-04-13 10:27:50.000000000 +0200 -+++ util-vserver-0.30.208-lockfix/src/lockfile.c 2005-09-30 10:24:09.102509750 +0200 -@@ -32,6 +32,8 @@ - #include <sys/file.h> - #include <sys/param.h> - -+char *argv1; -+ - static void - showHelp(char const *cmd) - { -@@ -83,6 +85,7 @@ alarmFunc(int UNUSED sig) - static void - quitFunc(int UNUSED sig) - { -+ unlink(argv1); - _exit(0); - } - -@@ -107,7 +110,9 @@ int main(int argc, char *argv[]) - end_time = time(0); - if (argc==idx+3) end_time += atoi(argv[idx+2]); - else end_time += 300; -- -+ -+ argv1 = argv[idx]; -+ - if ((sync_fd=open(argv[idx+1], O_WRONLY))==-1) - perror("lockfile: open(<syncpipe>)"); - else if ((fd=open(argv[idx], O_CREAT|O_RDONLY|O_NOFOLLOW|O_NONBLOCK, 0644))==-1) -@@ -134,6 +139,7 @@ int main(int argc, char *argv[]) - close(sync_fd); - while (getppid()==ppid) sleep(10); - -+ unlink(argv[idx]); - return EXIT_SUCCESS; - } - diff --git a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-gentoo-tools.patch b/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-gentoo-tools.patch deleted file mode 100644 index 692f845..0000000 --- a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-gentoo-tools.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/Makefile-files util-vserver-0.30.208-gentootools/scripts/Makefile-files ---- util-vserver-0.30.208/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.208-gentootools/scripts/Makefile-files 2005-10-13 20:16:59.246103250 +0200 -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -diff -NurpP util-vserver-0.30.208/scripts/util-vserver-vars.pathsubst util-vserver-0.30.208-gentootools/scripts/util-vserver-vars.pathsubst ---- util-vserver-0.30.208/scripts/util-vserver-vars.pathsubst 2005-07-03 19:43:55.000000000 +0200 -+++ util-vserver-0.30.208-gentootools/scripts/util-vserver-vars.pathsubst 2005-10-13 20:20:00.861453500 +0200 -@@ -42,6 +42,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -66,6 +67,9 @@ _VAPT_GET="$__SBINDIR/vapt-get" - _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get-worker" - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" - _VLIMIT="$__SBINDIR/vlimit" -@@ -78,7 +82,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -89,6 +95,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-testsuite-fix.patch b/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-testsuite-fix.patch deleted file mode 100644 index a1be029..0000000 --- a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.208-testsuite-fix.patch +++ /dev/null @@ -1,33 +0,0 @@ -Origin: -http://vserver.13thfloor.at/Experimental/UTIL-VSERVER/delta-0.30.208-tsfix.diff ---- util-vserver-0.30.208/lib/testsuite/personality.c 2005-04-28 19:54:57 +0200 -+++ util-vserver-0.30.208-fix/lib/testsuite/personality.c 2005-08-11 17:51:25 +0200 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); diff --git a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.209-fix-skeleton-build.patch b/util-vserver/patches/0.30.209-r1/util-vserver-0.30.209-fix-skeleton-build.patch deleted file mode 100644 index 47fa266..0000000 --- a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.209-fix-skeleton-build.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-vserver-0.30.209/scripts/vserver-build.functions -=================================================================== ---- util-vserver-0.30.209.orig/scripts/vserver-build.functions -+++ util-vserver-0.30.209/scripts/vserver-build.functions -@@ -207,8 +207,6 @@ function base.__cleanup - { - test -z "$OPTION_KEEP" || return 0 - test -z "$__BASE_SUCCESS" || return 0 -- -- rm -rf "${__BASE_GENERATED_FILES[@]}" - } - - function base.init diff --git a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.209-r1/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.209-r1/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 93270c1..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2004-03-24 02:07:11.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-03 17:19:15.000000000 +0100 -@@ -25,7 +25,10 @@ - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ if (caps->bmask) -+ k_caps.bcaps = caps->bcaps & caps->bmask; -+ else -+ k_caps.bcaps = ~0; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-clone-arch.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-clone-arch.patch deleted file mode 100644 index de9d73c..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-clone-arch.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib_internal/sys_clone.h util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h ---- util-vserver-0.30.210.orig/lib_internal/sys_clone.h 2005-04-28 20:01:37.000000000 +0200 -+++ util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h 2006-04-06 01:58:22.000000000 +0200 -@@ -19,33 +19,61 @@ - #ifndef H_UTIL_VSERVER_SRC_SYS_CLONE_H - #define H_UTIL_VSERVER_SRC_SYS_CLONE_H - -+#include <unistd.h> - #include "lib/syscall-wrap.h" --#define __NR_sys_clone __NR_clone -+#define __NR__sys_clone __NR_clone - - #ifndef CLONE_NEWNS - # define CLONE_NEWNS 0x00020000 - #endif - - #ifdef ENSC_SYSCALL_TRADITIONAL --#include <unistd.h> -- - inline static UNUSED ALWAYSINLINE --int sys_clone(int flags, void *stack) -+int _sys_clone(int flags, void *stack) - { --#if defined __dietlibc__ -+# if defined __dietlibc__ - extern long int syscall (long int __sysno, ...); --#endif -+# endif - -- return syscall(__NR_sys_clone, flags, stack); -+# if defined(__s390__) -+ return syscall(__NR__sys_clone, stack, flags); -+# else -+ return syscall(__NR__sys_clone, flags, stack); -+# endif - } - #else --#include <errno.h> -+# include <errno.h> -+ -+# if defined(__s390__) -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, void *, child_stack, int, flags) -+# else -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, int, flags, void *, child_stack) -+# endif -+#endif - - inline static UNUSED ALWAYSINLINE --_syscall2(int, sys_clone, int, flags, void *, child_stack) -+int sys_clone(int flags, void *child_stack) -+{ -+ int ret; -+#ifdef __sparc__ -+ int parent = getpid(); - #endif - --#undef __NR_sys_clone -+#if defined(__s390__) && !defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = _sys_clone(child_stack, flags); -+#else -+ ret = _sys_clone(flags, child_stack); -+#endif -+#ifdef __sparc__ -+ if (ret == parent) -+ ret = 0; -+#endif -+ return ret; -+} -+ -+#undef __NR__sys_clone - - #define ENSC_HAVE_SYSCLONE 1 - diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-clone.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-clone.patch deleted file mode 100644 index 9bb46be..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-clone.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst 2006-03-16 01:48:57.000000000 +0100 -@@ -7,6 +7,7 @@ build @PKGLIBDIR@/vserver-build.skeleto - build @PKGLIBDIR@/vserver-build.debootstrap - build @PKGLIBDIR@/vserver-build.yum - build @PKGLIBDIR@/vserver-build.rpm -+build @PKGLIBDIR@/vserver-build.clone - build @PKGLIBDIR@/vserver-build.functions - build @PKGLIBDIR@/vserver-build.functions.apt - build @PKGLIBDIR@/vserver-build.functions.rpm -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.clone/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/Makefile-files 2006-03-16 02:08:32.000000000 +0100 -@@ -43,6 +43,7 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver-build.debootstrap \ - scripts/vserver-build.rpm \ - scripts/vserver-build.yum \ -+ scripts/vserver-build.clone \ - scripts/vserver-build.functions \ - scripts/vserver-build.functions.apt \ - scripts/vserver-build.functions.rpm \ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build util-vserver-0.30.210.clone/scripts/vserver-build ---- util-vserver-0.30.210.orig/scripts/vserver-build 2005-07-03 19:45:43.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/vserver-build 2006-03-16 01:48:36.000000000 +0100 -@@ -126,7 +126,7 @@ setup_setDefaults "$VSERVER_NAME" - - case x"$method" in - (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; -- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm) -+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone) - . $__PKGLIBDIR/vserver-build.$method - ;; - (x) panic $"No build-method specified";; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build.clone util-vserver-0.30.210.clone/scripts/vserver-build.clone ---- util-vserver-0.30.210.orig/scripts/vserver-build.clone 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.clone/scripts/vserver-build.clone 2006-03-16 02:08:07.000000000 +0100 -@@ -0,0 +1,60 @@ -+# $Id$ --*- sh -*-- -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+tmp=$(getopt -o '+d:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+DISTRIBUTION=: -+use_pkgmgmt= -+source= -+ -+while true; do -+ case "$1" in -+ -d) DISTRIBUTION=$2; shift;; -+ --debug) set -x;; -+ --pkgmgmt) use_pkgmgmt=1;; -+ --source) source=$2; shift;; -+ --) shift; break ;; -+ *) echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2 -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+test -z "$source" && panic $"vserver-build.clone: --source <vserver> is required!" -+ -+getDistribution '' 1 -+ -+base.init -+test -z "$use_pkgmgmt" || pkgmgmt.initVariables -+ -+base.initFilesystem "$OPTION_FORCE" -+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE" -+ -+setup_writeOption "$VSERVER_NAME" -+setup_writeInitialFstab -+ -+$_CP -a "$__CONFDIR/$source/vdir/." "$VDIR" -+ -+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+test -z "$1" || "$@" -+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+base.setSuccess diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-delete.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-delete.patch deleted file mode 100644 index c7b04d9..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-delete.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst 2006-03-25 00:33:26.000000000 +0100 -@@ -18,6 +18,7 @@ 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 - core @PKGLIBDIR@/util-vserver-vars - build @PKGLIBDIR@/rpm-fake.so - legacy @LEGACYDIR@/save_s_context -diff -Nurp util-vserver-0.30.210.orig/Makefile.in util-vserver-0.30.210.delete/Makefile.in ---- util-vserver-0.30.210.orig/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210.delete/Makefile.in 2006-04-06 19:50:42.000000000 +0200 -@@ -1927,7 +1927,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \ -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.delete/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/Makefile-files 2006-03-25 00:31:07.000000000 +0100 -@@ -52,7 +52,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.delete/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/vserver 2006-03-23 23:07:03.000000000 +0100 -@@ -57,6 +57,7 @@ Possible commands are: - - build <buildopts>* - ... builds a new vserver from scratch -+ delete ... remove a vserver - - unify [-R] - ... (de)unify vserver -@@ -199,7 +200,7 @@ test "$2" != start -o -n "$OPTION_NONAME - - . $__PKGLIBDIR/vserver.functions - case "$2" in -- (start|stop) -+ (start|stop|delete) - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.delete util-vserver-0.30.210.delete/scripts/vserver.delete ---- util-vserver-0.30.210.orig/scripts/vserver.delete 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.delete/scripts/vserver.delete 2006-03-25 00:49:35.000000000 +0100 -@@ -0,0 +1,34 @@ -+#! /bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS" -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+if test -z "$OPTION_SILENT" ; then -+ read -p "Are you sure you want to delete the vserver $vserver (y/N) " deleteok -+ if [[ ${deleteok} != [Yy] ]]; then -+ exit 2 -+ fi -+fi -+ -+isVserverRunning "$VSERVER_DIR" && -+ "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ -+base.init -+pkgmgmt.initVariables -+rm -rf "`readlink -f "$VSERVER_DIR"/vdir`" "$VSERVER_DIR" "$PKGCFGDIR" diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index 4e23352..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,501 +0,0 @@ -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers.h util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h 2006-04-07 12:12:36.912449000 +0200 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc 2006-04-07 12:12:36.916449000 +0200 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -NurpP util-vserver-0.30.210/Makefile.in util-vserver-0.30.210-vlogin/Makefile.in ---- util-vserver-0.30.210/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/Makefile.in 2006-04-07 12:12:36.944451000 +0200 -@@ -965,7 +965,7 @@ src_testsuite_vunify_functest_DEPENDENCI - am_src_vattribute_OBJECTS = src/vattribute.$(OBJEXT) - src_vattribute_OBJECTS = $(am_src_vattribute_OBJECTS) - src_vattribute_DEPENDENCIES = $(am__DEPENDENCIES_11) --am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) -+am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) src/vlogin.$(OBJEXT) - src_vcontext_OBJECTS = $(am_src_vcontext_OBJECTS) - src_vcontext_DEPENDENCIES = $(am__DEPENDENCIES_11) \ - $(am__DEPENDENCIES_9) -@@ -1746,7 +1746,7 @@ src_chbind_LDFLAGS = $(VSERVER_LDFLGS) - src_chcontext_compat_SOURCES = src/chcontext.c - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - src_vsched_SOURCES = src/vsched.c -@@ -3489,6 +3489,8 @@ src/vattribute$(EXEEXT): $(src_vattribut - $(LINK) $(src_vattribute_LDFLAGS) $(src_vattribute_OBJECTS) $(src_vattribute_LDADD) $(LIBS) - src/vcontext.$(OBJEXT): src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -+src/vlogin.$(OBJEXT): src/$(am__dirstamp) \ -+ src/$(DEPDIR)/$(am__dirstamp) - src/vcontext$(EXEEXT): $(src_vcontext_OBJECTS) $(src_vcontext_DEPENDENCIES) src/$(am__dirstamp) - @rm -f src/vcontext$(EXEEXT) - $(LINK) $(src_vcontext_LDFLAGS) $(src_vcontext_OBJECTS) $(src_vcontext_LDADD) $(LIBS) -@@ -4222,6 +4224,7 @@ mostlyclean-compile: - -rm -f src/vdu.$(OBJEXT) - -rm -f src/vhashify.$(OBJEXT) - -rm -f src/vlimit.$(OBJEXT) -+ -rm -f src/vlogin.$(OBJEXT) - -rm -f src/vnamespace.$(OBJEXT) - -rm -f src/vps.$(OBJEXT) - -rm -f src/vreboot.$(OBJEXT) -@@ -4593,6 +4596,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdu.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vhashify.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlimit.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlogin.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vnamespace.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vps.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vreboot.Po@am__quote@ -diff -NurpP util-vserver-0.30.210/scripts/vserver.functions util-vserver-0.30.210-vlogin/scripts/vserver.functions ---- util-vserver-0.30.210/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/scripts/vserver.functions 2006-04-07 12:12:36.944451000 +0200 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -NurpP util-vserver-0.30.210/src/Makefile-files util-vserver-0.30.210-vlogin/src/Makefile-files ---- util-vserver-0.30.210/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/Makefile-files 2006-04-07 12:12:36.952452000 +0200 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -NurpP util-vserver-0.30.210/src/vcontext.c util-vserver-0.30.210-vlogin/src/vcontext.c ---- util-vserver-0.30.210/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210-vlogin/src/vcontext.c 2006-04-07 16:54:41.962816000 +0200 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(int argc, char *argv[], int ind); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -233,7 +239,7 @@ doExternalSync(int fd, char const *msg) - } - - static inline ALWAYSINLINE int --doit(struct Arguments const *args, char *argv[]) -+doit(struct Arguments const *args, int argc, char *argv[]) - { - int p[2][2]; - pid_t pid = initSync(p, args->do_disconnect); -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argc, argv, optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -@@ -408,7 +419,7 @@ int main (int argc, char *argv[]) - else if (optind>=argc) - WRITE_MSG(2, "No command given; use '--help' for more information.\n"); - else -- return doit(&args, argv); -+ return doit(&args, argc, argv); - - return wrapper_exit_code; - } -diff -NurpP util-vserver-0.30.210/src/vlogin.c util-vserver-0.30.210-vlogin/src/vlogin.c ---- util-vserver-0.30.210/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/vlogin.c 2006-04-07 16:55:29.201768250 +0200 -@@ -0,0 +1,281 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <strings.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* convert terminal settings to raw mode */ -+ cfmakeraw(&buf); -+ -+ /* apply raw terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activities */ -+static void -+terminal_copy(int src, int dst) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(src, buf, sizeof(buf)); -+ -+ /* write activity to user */ -+ EwriteAll(dst, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(int argc, char *argv[], int ind) -+{ -+ int slave; -+ pid_t pid; -+ int n, i; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[ind], argv+ind); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[ind], argv+ind); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* set process title for ps */ -+ n = strlen(argv[0]); -+ -+ for (i = 0; i < argc; i++) -+ bzero(argv[i], strlen(argv[i])); -+ -+ strncpy(argv[0], "login", n); -+ -+ /* reset terminal to its original mode */ -+ atexit(terminal_reset); -+ -+ /* we want a redraw */ -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ terminal_copy(STDIN_FILENO, t.fd); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_copy(t.fd, STDOUT_FILENO); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r10/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 93270c1..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2004-03-24 02:07:11.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-03 17:19:15.000000000 +0100 -@@ -25,7 +25,10 @@ - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ if (caps->bmask) -+ k_caps.bcaps = caps->bcaps & caps->bmask; -+ else -+ k_caps.bcaps = ~0; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-chcontext.8.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-chcontext.8.patch deleted file mode 100644 index bf09182..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-chcontext.8.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: util-vserver-0.30.210/man/chcontext.8 -=================================================================== ---- util-vserver-0.30.210.orig/man/chcontext.8 -+++ util-vserver-0.30.210/man/chcontext.8 -@@ -1,4 +1,4 @@ --.TH "chcontext" "1" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" -+.TH "chcontext" "8" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" - .SH "NAME" - .LP - chcontext \- chcontext allocates a new security context and executes a command in that context. diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-clone-arch.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-clone-arch.patch deleted file mode 100644 index de9d73c..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-clone-arch.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib_internal/sys_clone.h util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h ---- util-vserver-0.30.210.orig/lib_internal/sys_clone.h 2005-04-28 20:01:37.000000000 +0200 -+++ util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h 2006-04-06 01:58:22.000000000 +0200 -@@ -19,33 +19,61 @@ - #ifndef H_UTIL_VSERVER_SRC_SYS_CLONE_H - #define H_UTIL_VSERVER_SRC_SYS_CLONE_H - -+#include <unistd.h> - #include "lib/syscall-wrap.h" --#define __NR_sys_clone __NR_clone -+#define __NR__sys_clone __NR_clone - - #ifndef CLONE_NEWNS - # define CLONE_NEWNS 0x00020000 - #endif - - #ifdef ENSC_SYSCALL_TRADITIONAL --#include <unistd.h> -- - inline static UNUSED ALWAYSINLINE --int sys_clone(int flags, void *stack) -+int _sys_clone(int flags, void *stack) - { --#if defined __dietlibc__ -+# if defined __dietlibc__ - extern long int syscall (long int __sysno, ...); --#endif -+# endif - -- return syscall(__NR_sys_clone, flags, stack); -+# if defined(__s390__) -+ return syscall(__NR__sys_clone, stack, flags); -+# else -+ return syscall(__NR__sys_clone, flags, stack); -+# endif - } - #else --#include <errno.h> -+# include <errno.h> -+ -+# if defined(__s390__) -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, void *, child_stack, int, flags) -+# else -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, int, flags, void *, child_stack) -+# endif -+#endif - - inline static UNUSED ALWAYSINLINE --_syscall2(int, sys_clone, int, flags, void *, child_stack) -+int sys_clone(int flags, void *child_stack) -+{ -+ int ret; -+#ifdef __sparc__ -+ int parent = getpid(); - #endif - --#undef __NR_sys_clone -+#if defined(__s390__) && !defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = _sys_clone(child_stack, flags); -+#else -+ ret = _sys_clone(flags, child_stack); -+#endif -+#ifdef __sparc__ -+ if (ret == parent) -+ ret = 0; -+#endif -+ return ret; -+} -+ -+#undef __NR__sys_clone - - #define ENSC_HAVE_SYSCLONE 1 - diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-clone.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-clone.patch deleted file mode 100644 index 9bb46be..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-clone.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst 2006-03-16 01:48:57.000000000 +0100 -@@ -7,6 +7,7 @@ build @PKGLIBDIR@/vserver-build.skeleto - build @PKGLIBDIR@/vserver-build.debootstrap - build @PKGLIBDIR@/vserver-build.yum - build @PKGLIBDIR@/vserver-build.rpm -+build @PKGLIBDIR@/vserver-build.clone - build @PKGLIBDIR@/vserver-build.functions - build @PKGLIBDIR@/vserver-build.functions.apt - build @PKGLIBDIR@/vserver-build.functions.rpm -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.clone/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/Makefile-files 2006-03-16 02:08:32.000000000 +0100 -@@ -43,6 +43,7 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver-build.debootstrap \ - scripts/vserver-build.rpm \ - scripts/vserver-build.yum \ -+ scripts/vserver-build.clone \ - scripts/vserver-build.functions \ - scripts/vserver-build.functions.apt \ - scripts/vserver-build.functions.rpm \ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build util-vserver-0.30.210.clone/scripts/vserver-build ---- util-vserver-0.30.210.orig/scripts/vserver-build 2005-07-03 19:45:43.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/vserver-build 2006-03-16 01:48:36.000000000 +0100 -@@ -126,7 +126,7 @@ setup_setDefaults "$VSERVER_NAME" - - case x"$method" in - (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; -- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm) -+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone) - . $__PKGLIBDIR/vserver-build.$method - ;; - (x) panic $"No build-method specified";; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build.clone util-vserver-0.30.210.clone/scripts/vserver-build.clone ---- util-vserver-0.30.210.orig/scripts/vserver-build.clone 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.clone/scripts/vserver-build.clone 2006-03-16 02:08:07.000000000 +0100 -@@ -0,0 +1,60 @@ -+# $Id$ --*- sh -*-- -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+tmp=$(getopt -o '+d:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+DISTRIBUTION=: -+use_pkgmgmt= -+source= -+ -+while true; do -+ case "$1" in -+ -d) DISTRIBUTION=$2; shift;; -+ --debug) set -x;; -+ --pkgmgmt) use_pkgmgmt=1;; -+ --source) source=$2; shift;; -+ --) shift; break ;; -+ *) echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2 -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+test -z "$source" && panic $"vserver-build.clone: --source <vserver> is required!" -+ -+getDistribution '' 1 -+ -+base.init -+test -z "$use_pkgmgmt" || pkgmgmt.initVariables -+ -+base.initFilesystem "$OPTION_FORCE" -+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE" -+ -+setup_writeOption "$VSERVER_NAME" -+setup_writeInitialFstab -+ -+$_CP -a "$__CONFDIR/$source/vdir/." "$VDIR" -+ -+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+test -z "$1" || "$@" -+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+base.setSuccess diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-delete.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-delete.patch deleted file mode 100644 index c7b04d9..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-delete.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst 2006-03-25 00:33:26.000000000 +0100 -@@ -18,6 +18,7 @@ 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 - core @PKGLIBDIR@/util-vserver-vars - build @PKGLIBDIR@/rpm-fake.so - legacy @LEGACYDIR@/save_s_context -diff -Nurp util-vserver-0.30.210.orig/Makefile.in util-vserver-0.30.210.delete/Makefile.in ---- util-vserver-0.30.210.orig/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210.delete/Makefile.in 2006-04-06 19:50:42.000000000 +0200 -@@ -1927,7 +1927,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \ -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.delete/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/Makefile-files 2006-03-25 00:31:07.000000000 +0100 -@@ -52,7 +52,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.delete/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/vserver 2006-03-23 23:07:03.000000000 +0100 -@@ -57,6 +57,7 @@ Possible commands are: - - build <buildopts>* - ... builds a new vserver from scratch -+ delete ... remove a vserver - - unify [-R] - ... (de)unify vserver -@@ -199,7 +200,7 @@ test "$2" != start -o -n "$OPTION_NONAME - - . $__PKGLIBDIR/vserver.functions - case "$2" in -- (start|stop) -+ (start|stop|delete) - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.delete util-vserver-0.30.210.delete/scripts/vserver.delete ---- util-vserver-0.30.210.orig/scripts/vserver.delete 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.delete/scripts/vserver.delete 2006-03-25 00:49:35.000000000 +0100 -@@ -0,0 +1,34 @@ -+#! /bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS" -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+if test -z "$OPTION_SILENT" ; then -+ read -p "Are you sure you want to delete the vserver $vserver (y/N) " deleteok -+ if [[ ${deleteok} != [Yy] ]]; then -+ exit 2 -+ fi -+fi -+ -+isVserverRunning "$VSERVER_DIR" && -+ "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ -+base.init -+pkgmgmt.initVariables -+rm -rf "`readlink -f "$VSERVER_DIR"/vdir`" "$VSERVER_DIR" "$PKGCFGDIR" diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-vcontext-uid.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-vcontext-uid.patch deleted file mode 100644 index a73b1fd..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-vcontext-uid.patch +++ /dev/null @@ -1,134 +0,0 @@ -Index: util-vserver-0.30.210/ensc_wrappers/wrappers-unistd.hc -=================================================================== ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc -+++ util-vserver-0.30.210/ensc_wrappers/wrappers-unistd.hc -@@ -156,6 +156,12 @@ Esetgroups(size_t size, const gid_t *lis - { - FatalErrnoError(setgroups(size, list)==-1, "setgroups()"); - } -+ -+inline static void -+Einitgroups(const char *user, gid_t group) -+{ -+ FatalErrnoError(initgroups(user, group)==-1, "initgroups()"); -+} - #endif - - inline static WRAPPER_DECL int -Index: util-vserver-0.30.210/scripts/vserver -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver -+++ util-vserver-0.30.210/scripts/vserver -@@ -213,7 +213,7 @@ case "$2" in - ;; - (exec) - shift 2 -- suexec root "$@" -+ suexec 0 "$@" - ;; - (chkconfig) - shift 2 -@@ -221,7 +221,7 @@ case "$2" in - ;; - (enter) - getEnterShell "$VSERVER_DIR" -- suexec root "${ENTER_SHELL[@]}" -+ suexec 0 "${ENTER_SHELL[@]}" - ;; - (running) - isVserverRunning "$VSERVER_DIR" -Index: util-vserver-0.30.210/src/vcontext.c -=================================================================== ---- util-vserver-0.30.210.orig/src/vcontext.c -+++ util-vserver-0.30.210/src/vcontext.c -@@ -1,6 +1,6 @@ - // $Id: vcontext.c,v 1.18 2005/04/28 18:08:12 ensc Exp $ --*- c -*-- - --// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - // - // 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 -@@ -33,6 +33,9 @@ - #include <sys/un.h> - #include <assert.h> - #include <signal.h> -+#include <sys/types.h> -+#include <pwd.h> -+#include <grp.h> - - #include <linux/personality.h> - -@@ -104,7 +107,7 @@ struct Arguments { - uint_least32_t personality_type; - int verbosity; - bool do_chroot; -- uid_t uid; -+ char const * uid; - xid_t xid; - char const * sync_sock; - char const * sync_msg; -@@ -159,7 +162,7 @@ showVersion() - WRITE_MSG(1, - "vcontext " VERSION " -- manages the creation of security contexts\n" - "This program is part of " PACKAGE_STRING "\n\n" -- "Copyright (C) 2004 Enrico Scholz\n" -+ "Copyright (C) 2004-2006 Enrico Scholz\n" - VERSION_COPYRIGHT_DISCLAIMER); - exit(0); - } -@@ -275,9 +278,33 @@ doit(struct Arguments const *args, char - if (args->do_migrate && !args->do_migrateself) - Evc_ctx_migrate(xid); - -- if (args->uid!=(uid_t)(-1) && getuid()!=args->uid) { -- Esetuid(args->uid); -- if (getuid()!=args->uid) { -+ if (args->uid != NULL) { -+ uid_t uid = 0; -+ unsigned long tmp; -+ -+ if (!isNumberUnsigned(args->uid, &tmp, false)) { -+#ifdef __dietlibc__ -+ struct passwd *pw; -+ pw = getpwnam(args->uid); -+ if (pw == NULL) { -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Username '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' does not exist\n"); -+ } -+ uid = pw->pw_uid; -+ Einitgroups(args->uid, pw->pw_gid); -+ Esetgid(pw->pw_gid); -+#else -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Uid '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' is not a number\n"); -+#endif -+ } -+ else -+ uid = (uid_t) tmp; -+ -+ Esetuid((uid_t) uid); -+ if (getuid()!=uid) { - WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Something went wrong while changing the UID\n"); - exit(wrapper_exit_code); - } -@@ -345,7 +372,7 @@ int main (int argc, char *argv[]) - .is_silentexist = false, - .set_namespace = false, - .verbosity = 1, -- .uid = -1, -+ .uid = NULL, - .xid = VC_DYNAMIC_XID, - .personality_type = VC_BAD_PERSONALITY, - .personality_flags = 0, -@@ -369,7 +396,7 @@ int main (int argc, char *argv[]) - case CMD_SILENTEXIST : args.is_silentexist = true; break; - case CMD_SYNCSOCK : args.sync_sock = optarg; break; - case CMD_SYNCMSG : args.sync_msg = optarg; break; -- case CMD_UID : args.uid = atol(optarg); break; -+ case CMD_UID : args.uid = optarg; break; - case CMD_XID : args.xid = Evc_xidopt2xid(optarg,true); break; - case CMD_SILENT : --args.verbosity; break; - case CMD_PERSTYPE : diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index 4e23352..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,501 +0,0 @@ -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers.h util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h 2006-04-07 12:12:36.912449000 +0200 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc 2006-04-07 12:12:36.916449000 +0200 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -NurpP util-vserver-0.30.210/Makefile.in util-vserver-0.30.210-vlogin/Makefile.in ---- util-vserver-0.30.210/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/Makefile.in 2006-04-07 12:12:36.944451000 +0200 -@@ -965,7 +965,7 @@ src_testsuite_vunify_functest_DEPENDENCI - am_src_vattribute_OBJECTS = src/vattribute.$(OBJEXT) - src_vattribute_OBJECTS = $(am_src_vattribute_OBJECTS) - src_vattribute_DEPENDENCIES = $(am__DEPENDENCIES_11) --am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) -+am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) src/vlogin.$(OBJEXT) - src_vcontext_OBJECTS = $(am_src_vcontext_OBJECTS) - src_vcontext_DEPENDENCIES = $(am__DEPENDENCIES_11) \ - $(am__DEPENDENCIES_9) -@@ -1746,7 +1746,7 @@ src_chbind_LDFLAGS = $(VSERVER_LDFLGS) - src_chcontext_compat_SOURCES = src/chcontext.c - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - src_vsched_SOURCES = src/vsched.c -@@ -3489,6 +3489,8 @@ src/vattribute$(EXEEXT): $(src_vattribut - $(LINK) $(src_vattribute_LDFLAGS) $(src_vattribute_OBJECTS) $(src_vattribute_LDADD) $(LIBS) - src/vcontext.$(OBJEXT): src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -+src/vlogin.$(OBJEXT): src/$(am__dirstamp) \ -+ src/$(DEPDIR)/$(am__dirstamp) - src/vcontext$(EXEEXT): $(src_vcontext_OBJECTS) $(src_vcontext_DEPENDENCIES) src/$(am__dirstamp) - @rm -f src/vcontext$(EXEEXT) - $(LINK) $(src_vcontext_LDFLAGS) $(src_vcontext_OBJECTS) $(src_vcontext_LDADD) $(LIBS) -@@ -4222,6 +4224,7 @@ mostlyclean-compile: - -rm -f src/vdu.$(OBJEXT) - -rm -f src/vhashify.$(OBJEXT) - -rm -f src/vlimit.$(OBJEXT) -+ -rm -f src/vlogin.$(OBJEXT) - -rm -f src/vnamespace.$(OBJEXT) - -rm -f src/vps.$(OBJEXT) - -rm -f src/vreboot.$(OBJEXT) -@@ -4593,6 +4596,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdu.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vhashify.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlimit.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlogin.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vnamespace.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vps.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vreboot.Po@am__quote@ -diff -NurpP util-vserver-0.30.210/scripts/vserver.functions util-vserver-0.30.210-vlogin/scripts/vserver.functions ---- util-vserver-0.30.210/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/scripts/vserver.functions 2006-04-07 12:12:36.944451000 +0200 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -NurpP util-vserver-0.30.210/src/Makefile-files util-vserver-0.30.210-vlogin/src/Makefile-files ---- util-vserver-0.30.210/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/Makefile-files 2006-04-07 12:12:36.952452000 +0200 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -NurpP util-vserver-0.30.210/src/vcontext.c util-vserver-0.30.210-vlogin/src/vcontext.c ---- util-vserver-0.30.210/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210-vlogin/src/vcontext.c 2006-04-07 16:54:41.962816000 +0200 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(int argc, char *argv[], int ind); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -233,7 +239,7 @@ doExternalSync(int fd, char const *msg) - } - - static inline ALWAYSINLINE int --doit(struct Arguments const *args, char *argv[]) -+doit(struct Arguments const *args, int argc, char *argv[]) - { - int p[2][2]; - pid_t pid = initSync(p, args->do_disconnect); -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argc, argv, optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -@@ -408,7 +419,7 @@ int main (int argc, char *argv[]) - else if (optind>=argc) - WRITE_MSG(2, "No command given; use '--help' for more information.\n"); - else -- return doit(&args, argv); -+ return doit(&args, argc, argv); - - return wrapper_exit_code; - } -diff -NurpP util-vserver-0.30.210/src/vlogin.c util-vserver-0.30.210-vlogin/src/vlogin.c ---- util-vserver-0.30.210/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/vlogin.c 2006-04-07 16:55:29.201768250 +0200 -@@ -0,0 +1,281 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <strings.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* convert terminal settings to raw mode */ -+ cfmakeraw(&buf); -+ -+ /* apply raw terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activities */ -+static void -+terminal_copy(int src, int dst) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(src, buf, sizeof(buf)); -+ -+ /* write activity to user */ -+ EwriteAll(dst, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(int argc, char *argv[], int ind) -+{ -+ int slave; -+ pid_t pid; -+ int n, i; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[ind], argv+ind); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[ind], argv+ind); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* set process title for ps */ -+ n = strlen(argv[0]); -+ -+ for (i = 0; i < argc; i++) -+ bzero(argv[i], strlen(argv[i])); -+ -+ strncpy(argv[0], "login", n); -+ -+ /* reset terminal to its original mode */ -+ atexit(terminal_reset); -+ -+ /* we want a redraw */ -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ terminal_copy(STDIN_FILENO, t.fd); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_copy(t.fd, STDOUT_FILENO); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r11/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index a528752..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/legacy/vserver util-vserver-0.30.210.nice/scripts/legacy/vserver ---- util-vserver-0.30.210.orig/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/legacy/vserver 2006-04-13 02:34:40.000000000 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.nice/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/vserver.functions 2006-04-13 02:35:35.000000000 +0200 -@@ -98,12 +98,11 @@ function _generateChbindOptions - function _generateNiceCommand - { - local vdir=$1 -- local nice -+ local nice=0 - -- test -r "$vdir/nice" || return 0; -- read nice <"$vdir"/nice -+ test -r "$vdir/nice" && read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 57737fc..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc util-vserver-0.30.210/lib/syscall_setccaps-v13.hc ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2006-03-12 22:01:36.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-12 22:02:23.000000000 +0100 -@@ -25,7 +25,7 @@ vc_set_ccaps_v13(xid_t xid, struct vc_ct - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ k_caps.bcaps = (caps->bcaps & caps->bmask) | ~caps->bmask; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-chcontext.8.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-chcontext.8.patch deleted file mode 100644 index bf09182..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-chcontext.8.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: util-vserver-0.30.210/man/chcontext.8 -=================================================================== ---- util-vserver-0.30.210.orig/man/chcontext.8 -+++ util-vserver-0.30.210/man/chcontext.8 -@@ -1,4 +1,4 @@ --.TH "chcontext" "1" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" -+.TH "chcontext" "8" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" - .SH "NAME" - .LP - chcontext \- chcontext allocates a new security context and executes a command in that context. diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-clone-arch.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-clone-arch.patch deleted file mode 100644 index fbbdb51..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-clone-arch.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib_internal/sys_clone.h util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h ---- util-vserver-0.30.210.orig/lib_internal/sys_clone.h 2005-04-28 20:01:37.000000000 +0200 -+++ util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h 2006-04-10 23:43:29.000000000 +0200 -@@ -19,33 +19,54 @@ - #ifndef H_UTIL_VSERVER_SRC_SYS_CLONE_H - #define H_UTIL_VSERVER_SRC_SYS_CLONE_H - -+#include <unistd.h> - #include "lib/syscall-wrap.h" --#define __NR_sys_clone __NR_clone -+#define __NR__sys_clone __NR_clone - - #ifndef CLONE_NEWNS - # define CLONE_NEWNS 0x00020000 - #endif - --#ifdef ENSC_SYSCALL_TRADITIONAL --#include <unistd.h> -+#ifndef ENSC_SYSCALL_TRADITIONAL -+# include <errno.h> - -+# if defined(__s390__) - inline static UNUSED ALWAYSINLINE --int sys_clone(int flags, void *stack) -+_syscall2(int, _sys_clone, void *, child_stack, int, flags) -+# else -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, int, flags, void *, child_stack) -+# endif -+#endif -+ -+inline static UNUSED ALWAYSINLINE -+int sys_clone(int flags, void *child_stack) - { --#if defined __dietlibc__ -+ int ret; -+#ifdef __sparc__ -+ int parent = getpid(); -+#endif -+#if defined(__dietlibc__) && defined(ENSC_SYSCALL_TRADITIONAL) - extern long int syscall (long int __sysno, ...); - #endif -- -- return syscall(__NR_sys_clone, flags, stack); --} --#else --#include <errno.h> - --inline static UNUSED ALWAYSINLINE --_syscall2(int, sys_clone, int, flags, void *, child_stack) -+#if defined(__s390__) && defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, child_stack, flags); -+#elif defined(__s390__) -+ ret = _sys_clone(child_stack, flags); -+#elif defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, flags, child_stack); -+#else -+ ret = _sys_clone(flags, child_stack); -+#endif -+#ifdef __sparc__ -+ if (ret == parent) -+ ret = 0; - #endif -+ return ret; -+} - --#undef __NR_sys_clone -+#undef __NR__sys_clone - - #define ENSC_HAVE_SYSCLONE 1 - diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-clone.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-clone.patch deleted file mode 100644 index 9bb46be..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-clone.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst 2006-03-16 01:48:57.000000000 +0100 -@@ -7,6 +7,7 @@ build @PKGLIBDIR@/vserver-build.skeleto - build @PKGLIBDIR@/vserver-build.debootstrap - build @PKGLIBDIR@/vserver-build.yum - build @PKGLIBDIR@/vserver-build.rpm -+build @PKGLIBDIR@/vserver-build.clone - build @PKGLIBDIR@/vserver-build.functions - build @PKGLIBDIR@/vserver-build.functions.apt - build @PKGLIBDIR@/vserver-build.functions.rpm -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.clone/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/Makefile-files 2006-03-16 02:08:32.000000000 +0100 -@@ -43,6 +43,7 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver-build.debootstrap \ - scripts/vserver-build.rpm \ - scripts/vserver-build.yum \ -+ scripts/vserver-build.clone \ - scripts/vserver-build.functions \ - scripts/vserver-build.functions.apt \ - scripts/vserver-build.functions.rpm \ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build util-vserver-0.30.210.clone/scripts/vserver-build ---- util-vserver-0.30.210.orig/scripts/vserver-build 2005-07-03 19:45:43.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/vserver-build 2006-03-16 01:48:36.000000000 +0100 -@@ -126,7 +126,7 @@ setup_setDefaults "$VSERVER_NAME" - - case x"$method" in - (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; -- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm) -+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone) - . $__PKGLIBDIR/vserver-build.$method - ;; - (x) panic $"No build-method specified";; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build.clone util-vserver-0.30.210.clone/scripts/vserver-build.clone ---- util-vserver-0.30.210.orig/scripts/vserver-build.clone 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.clone/scripts/vserver-build.clone 2006-03-16 02:08:07.000000000 +0100 -@@ -0,0 +1,60 @@ -+# $Id$ --*- sh -*-- -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+tmp=$(getopt -o '+d:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+DISTRIBUTION=: -+use_pkgmgmt= -+source= -+ -+while true; do -+ case "$1" in -+ -d) DISTRIBUTION=$2; shift;; -+ --debug) set -x;; -+ --pkgmgmt) use_pkgmgmt=1;; -+ --source) source=$2; shift;; -+ --) shift; break ;; -+ *) echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2 -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+test -z "$source" && panic $"vserver-build.clone: --source <vserver> is required!" -+ -+getDistribution '' 1 -+ -+base.init -+test -z "$use_pkgmgmt" || pkgmgmt.initVariables -+ -+base.initFilesystem "$OPTION_FORCE" -+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE" -+ -+setup_writeOption "$VSERVER_NAME" -+setup_writeInitialFstab -+ -+$_CP -a "$__CONFDIR/$source/vdir/." "$VDIR" -+ -+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+test -z "$1" || "$@" -+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+base.setSuccess diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-condrestart.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-condrestart.patch deleted file mode 100644 index cdd8cde..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-condrestart.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.condrestart/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.condrestart/scripts/vserver 2006-04-13 02:10:28.000000000 +0200 -@@ -208,7 +208,7 @@ case "$2" in - $cmd "$@" - ;; - (condrestart) -- test ! isVserverRunning "$VSERVER_DIR" || restart -+ ! isVserverRunning "$VSERVER_DIR" || restart - ;; - (exec) - shift 2 diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-cpuset.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-cpuset.patch deleted file mode 100644 index 9f21a83..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-cpuset.patch +++ /dev/null @@ -1,175 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.cpuset/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.functions 2006-04-13 01:36:34.000000000 +0200 -@@ -690,6 +690,54 @@ function generateOptions - fi - } - -+function addtoCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ local i -+ local configured=0 -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ test -d /dev/cpuset/"$cpuset" || mkdir /dev/cpuset/"$cpuset" || configured=1 -+ for i in cpus mems cpu_exclusive mem_exclusive virtualize; do -+ if test -e "$f"/"$i"; then -+ cat "$f"/"$i" >/dev/cpuset/"$cpuset"/"$i" 2>/dev/null || { -+ configured=1 -+ break -+ } -+ fi -+ done -+ } -+ -+ echo $$ >/dev/cpuset/"$cpuset"/tasks || configured=1 -+ if [ "$configured" -ne 0 ]; then -+ warning $"\ -+WARNING: Failed to create or CPUSET \"$cpuset\" does not exist! Not using it!" >&2 -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ return 0 -+ fi -+} -+ -+function removeCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ } -+} -+ - function _mountVserverInternal - { - local fstab="$1" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-setup.functions util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions ---- util-vserver-0.30.210.orig/scripts/vserver-setup.functions 2006-01-03 00:50:21.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions 2006-04-13 01:39:08.000000000 +0200 -@@ -24,11 +24,15 @@ SETUP_LOCKFILE= - SETUP_CONFDIR= - SETUP_CONTEXT= - SETUP_INITSTYLE= -+SETUP_CPUSET= -+SETUP_CPUSETCPUS= -+SETUP_CPUSETMEMS= -+SETUP_CPUSETVIRT= - - declare -a SETUP_INTERFACES=() - declare -a SETUP_FLAGS=() - --declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:" -+declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:,cpuset:,cpusetcpus:,cpusetmems:,cpusetvirt" - declare -r SETUP_HELPMSG=$" - --context ... the static context of the vserver [default: none; a dynamic - context will be assumed] -@@ -55,6 +59,19 @@ declare -r SETUP_HELPMSG=$" - this becomes a per vserver limit) - private: No other process can join this security context. - Even root -+ --cpuset <name> -+ ... declares the CPUSET this vserver will run in [default: none] -+ --cpusetcpus <number[-number][:<exclusive>]> -+ ... sets which cpus belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those cpus -+ --cpusetmems <number[-number][:<exclusive>]> -+ ... sets which memory pools belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those memory pools -+ --cpusetvirt -+ ... virtualize cpuset (guest will see only CPUs defined in cpuset) -+ Requires kernel patch from http://www.bullopensource.org/cpuset/ - --initstyle <style> - ... configures the initstyle (e.g. minit,sysv,plain) - " -@@ -71,7 +88,23 @@ function setup_setOption2 - (--netprefix) SETUP_NETPREFIX=$2;; - (--netbcast) SETUP_NETBCAST=$2;; - (--interface) SETUP_INTERFACES=( "${SETUP_INTERFACES[@]}" "$2" );; -- (--initstyle) SETUP_INITSTYLE=$2;; -+ (--initstyle) SETUP_INITSTYLE=$2;; -+ (--cpuset) SETUP_CPUSET=$2;; -+ (--cpusetcpus) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETCPUS=$1 -+ SETUP_CPUSETCPUSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetmems) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETMEMS=$1 -+ SETUP_CPUSETMEMSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetvirt) SETUP_CPUSETVIRT=1;; - (--flags) old_IFS=$IFS - IFS=, - set -- $2 -@@ -140,7 +173,7 @@ function setup_writeOption - local cfgdir=${SETUP_CONFDIR:?} - local i - -- mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts -+ mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts "$cfgdir"/cpuset - - _setup_writeSingleOption "$name" "$cfgdir"/name - _setup_writeSingleOption "$SETUP_CONTEXT" "$cfgdir"/context -@@ -150,6 +183,12 @@ function setup_writeOption - _setup_writeSingleOption "$SETUP_NETPREFIX" "$cfgdir"/interfaces/prefix - _setup_writeSingleOption "$SETUP_NETBCAST" "$cfgdir"/interfaces/bcast - _setup_writeSingleOption "$SETUP_INITSTYLE" "$cfgdir"/apps/init/style -+ _setup_writeSingleOption "$SETUP_CPUSET" "$cfgdir"/cpuset/name -+ _setup_writeSingleOption "$SETUP_CPUSETCPUS" "$cfgdir"/cpuset/cpus -+ _setup_writeSingleOption "$SETUP_CPUSETCPUSEXCL" "$cfgdir"/cpuset/cpus_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETMEMS" "$cfgdir"/cpuset/mems -+ _setup_writeSingleOption "$SETUP_CPUSETMEMSEXCL" "$cfgdir"/cpuset/mem_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETVIRT" "$cfgdir"/cpuset/virtualize - - local idx=0 - for i in "${SETUP_INTERFACES[@]}"; do -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.start util-vserver-0.30.210.cpuset/scripts/vserver.start ---- util-vserver-0.30.210.orig/scripts/vserver.start 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.start 2006-04-13 01:36:34.000000000 +0200 -@@ -113,6 +113,7 @@ enableInterfaces "$VSERVER_DIR" && have_ - - mountVserver "$VSERVER_DIR" && is_mounted=1 - prepareInit "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - pushd "$VSERVER_DIR"/vdir/ >/dev/null - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-start -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.stop util-vserver-0.30.210.cpuset/scripts/vserver.stop ---- util-vserver-0.30.210.orig/scripts/vserver.stop 2006-01-21 14:22:23.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.stop 2006-04-13 01:36:34.000000000 +0200 -@@ -101,3 +101,4 @@ disableInterfaces "$VSERVER_DIR" - saveDiskLimits "$VSERVER_DIR" - - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" postpost-stop -+removeCPUSET "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.suexec util-vserver-0.30.210.cpuset/scripts/vserver.suexec ---- util-vserver-0.30.210.orig/scripts/vserver.suexec 2005-07-15 21:01:06.000000000 +0200 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.suexec 2006-04-13 01:36:34.000000000 +0200 -@@ -22,6 +22,7 @@ test -z "$is_stopped" -o "$OPTION_INSECU - exit 1 - } - generateOptions "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - user=$1 - shift diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-debootstrap-script.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-debootstrap-script.patch deleted file mode 100644 index f435c7e..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-debootstrap-script.patch +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 05_vserver-build_dbootstrap_script.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/scripts/vserver-build trunk/scripts/vserver-build ---- trunk~/scripts/vserver-build 2006-03-20 10:28:10.000000000 -0500 -+++ trunk/scripts/vserver-build 2006-03-20 10:31:30.000000000 -0500 -@@ -64,7 +64,7 @@ - skeleton ... -- [<cmd> <args>*] - ... installs a minimal skeleton filesystem, creates the - configuration file and calls an optional command then -- debootstrap ... -- -d <distribution> [-m <mirror>] [-- <debootstrap-options>*] -+ debootstrap ... -- -d <distribution> [-m <mirror>] [-s <script> ] [-- <debootstrap-options>*] - bootstraps the vserver with Debian's 'debootstrap' package - - Please report bugs to $PACKAGE_BUGREPORT" -diff -urNad trunk~/scripts/vserver-build.debootstrap trunk/scripts/vserver-build.debootstrap ---- trunk~/scripts/vserver-build.debootstrap 2006-03-20 10:31:13.000000000 -0500 -+++ trunk/scripts/vserver-build.debootstrap 2006-03-20 10:33:08.000000000 -0500 -@@ -121,7 +121,8 @@ - ### main starts here <--- - - --tmp=$(getopt -o '+d:m:' --long debug -n "$0" -- "$@") || exit 1 -+#Parameter s added for debootstrap use -+tmp=$(getopt -o '+d:m:s:' --long debug -n "$0" -- "$@") || exit 1 - eval set -- "$tmp" - - init -@@ -130,6 +131,8 @@ - case "$1" in - (-d) DISTRIBUTION=$2; shift;; - (-m) mirror=$2; shift;; -+#Parameter s added for debootstrap scripts -+ (-s) script=$2; shift;; - (--debug) set -x;; - (--) shift; break ;; - (*) echo "vserver-build.debootstrap: internal error: unrecognized option '$1'" >&2 -@@ -151,7 +154,8 @@ - - test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - mv "$VDIR"/dev "$VDIR"/dev.X --"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" || : ## HACK: ignore all errors... -+#this adds the variable $script to the debootstrap call -+"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" "$script" || : ## HACK: ignore all errors... - fixupDebian "$VDIR" - test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-delete.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-delete.patch deleted file mode 100644 index c7b04d9..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-delete.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst 2006-03-25 00:33:26.000000000 +0100 -@@ -18,6 +18,7 @@ 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 - core @PKGLIBDIR@/util-vserver-vars - build @PKGLIBDIR@/rpm-fake.so - legacy @LEGACYDIR@/save_s_context -diff -Nurp util-vserver-0.30.210.orig/Makefile.in util-vserver-0.30.210.delete/Makefile.in ---- util-vserver-0.30.210.orig/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210.delete/Makefile.in 2006-04-06 19:50:42.000000000 +0200 -@@ -1927,7 +1927,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \ -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.delete/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/Makefile-files 2006-03-25 00:31:07.000000000 +0100 -@@ -52,7 +52,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.delete/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/vserver 2006-03-23 23:07:03.000000000 +0100 -@@ -57,6 +57,7 @@ Possible commands are: - - build <buildopts>* - ... builds a new vserver from scratch -+ delete ... remove a vserver - - unify [-R] - ... (de)unify vserver -@@ -199,7 +200,7 @@ test "$2" != start -o -n "$OPTION_NONAME - - . $__PKGLIBDIR/vserver.functions - case "$2" in -- (start|stop) -+ (start|stop|delete) - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.delete util-vserver-0.30.210.delete/scripts/vserver.delete ---- util-vserver-0.30.210.orig/scripts/vserver.delete 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.delete/scripts/vserver.delete 2006-03-25 00:49:35.000000000 +0100 -@@ -0,0 +1,34 @@ -+#! /bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS" -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+if test -z "$OPTION_SILENT" ; then -+ read -p "Are you sure you want to delete the vserver $vserver (y/N) " deleteok -+ if [[ ${deleteok} != [Yy] ]]; then -+ exit 2 -+ fi -+fi -+ -+isVserverRunning "$VSERVER_DIR" && -+ "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ -+base.init -+pkgmgmt.initVariables -+rm -rf "`readlink -f "$VSERVER_DIR"/vdir`" "$VSERVER_DIR" "$PKGCFGDIR" diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-fc5.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-fc5.patch deleted file mode 100644 index 895206c..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-fc5.patch +++ /dev/null @@ -1,403 +0,0 @@ -diff -NurpP util-vserver-0.30.210/distrib/centos42/pkgs/03 util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 ---- util-vserver-0.30.210/distrib/centos42/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 2006-04-13 14:44:32.579223250 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.579223250 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for CentOS 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/centos4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc4/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 ---- util-vserver-0.30.210/distrib/fc4/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities ---- util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities 2006-04-13 14:44:29.159009500 +0200 -@@ -0,0 +1,7 @@ -+Essential: -+ basesystem -+ coreutils -+ filesystem -+ glibc -+ setup -+ fedora-release -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/sources.list util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list ---- util-vserver-0.30.210/distrib/fc5/apt/sources.list 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+# rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates -+ -+# rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates -+# rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates -+# rpm http://download.fedora.us/fedora/fedora 3/i386 os updates -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/01 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 ---- util-vserver-0.30.210/distrib/fc5/pkgs/01 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1 @@ -+glibc -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/02 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 ---- util-vserver-0.30.210/distrib/fc5/pkgs/02 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,3 @@ -+--reinstall -+ -+filesystem -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 ---- util-vserver-0.30.210/distrib/fc5/pkgs/03 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+coreutils -+initscripts -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst ---- util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+basesystem-*.rpm -+filesystem-*.rpm -+glibc-common-*.rpm -+glibc-[0-9]*.rpm -+libgcc-[0-9]*.rpm -+setup-*.rpm -+tzdata-*.rpm -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum/yum.conf util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf ---- util-vserver-0.30.210/distrib/fc5/yum/yum.conf 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,10 @@ -+[main] -+cachedir=@YUMCACHEDIR@ -+reposdir=@YUMETCDIR@/yum.repos.d -+debuglevel=1 -+logfile=@YUMLOGDIR@/log -+lockfile=@YUMLOCKDIR@/yum.pid -+pkgpolicy=newest -+distroverpkg=fedora-release -+installonlypkgs= -+exactarch=0 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,6 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora Core 5 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc5-vps/ -+enabled=1 -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,21 @@ -+[core] -+name=Fedora Core 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/os/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-debuginfo] -+name=Fedora Core 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-source] -+name=Fedora Core 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo 2006-04-13 14:44:29.195011750 +0200 -@@ -0,0 +1,44 @@ -+# These packages are untested and still under development. This -+# repository is used for updates to test releases, and for -+# development of new releases. -+# -+# This repository can see significant daily turnover and major -+# functionality changes which cause unexpected problems with other -+# development packages. Please use these packages if you want to work -+# with the Fedora developers by testing these new development packages. -+# -+# fedora-test-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with new test releases. -+# -+# fedora-devel-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with developing new releases. -+# -+# More information is available at http://fedoraproject.org/wiki/Testing -+# -+# Reproducible and reportable issues should be filed at -+# http://bugzilla.redhat.com/. -+# -+# Product: Fedora Core -+# Version: devel -+ -+[development] -+name=Fedora Core - Development -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide -+enabled=0 -+gpgcheck=0 -+ -+[development-debuginfo] -+name=Fedora Core - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/debug/ -+enabled=0 -+gpgcheck=0 -+ -+[development-source] -+name=Fedora Core - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/ -+enabled=0 -+gpgcheck=0 -+ -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras-development] -+name=Fedora Extras - Development Tree -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-devel -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-debuginfo] -+name=Fedora Extras - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-source] -+name=Fedora Extras - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras] -+name=Fedora Extras 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-5 -+enabled=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-debuginfo] -+name=Fedora Extras 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-source] -+name=Fedora Extras 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,13 @@ -+[legacy-updates] -+name=Fedora Legacy 5 - $basearch - Updates -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-released-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -+ -+[legacy-testing] -+name=Fedora Legacy 5 - $basearch - Updates Testing -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates] -+name=Fedora Core 5 - $basearch - Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-debuginfo] -+name=Fedora Core 5 - $basearch - Updates - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-source] -+name=Fedora Core 5 - Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates-testing] -+name=Fedora Core 5 - $basearch - Test Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-debuginfo] -+name=Fedora Core 5 - $basearch - Test Updates Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-source] -+name=Fedora Core 5 - Test Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -diff -NurpP util-vserver-0.30.210/distrib/Makefile.am util-vserver-0.30.210-fc5/distrib/Makefile.am ---- util-vserver-0.30.210/distrib/Makefile.am 2005-10-28 19:53:49.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.am 2006-04-13 14:44:29.203012250 +0200 -@@ -40,13 +40,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -65,7 +68,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - - install-exec-hook: install-notify-xtra - install-data-hook: install-data-xtras -diff -NurpP util-vserver-0.30.210/distrib/Makefile.in util-vserver-0.30.210-fc5/distrib/Makefile.in ---- util-vserver-0.30.210/distrib/Makefile.in 2006-01-22 20:33:16.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.in 2006-04-13 14:44:29.203012250 +0200 -@@ -275,13 +275,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -297,7 +300,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - all: all-am - - .SUFFIXES: -@@ -444,7 +447,7 @@ CTAGS: - - - distdir: $(DISTFILES) -- $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template -+ $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/fc5/apt $(distdir)/fc5/pkgs $(distdir)/fc5/rpmlist.d $(distdir)/fc5/yum $(distdir)/fc5/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ -diff -NurpP util-vserver-0.30.210/distrib/redhat/initpost util-vserver-0.30.210-fc5/distrib/redhat/initpost ---- util-vserver-0.30.210/distrib/redhat/initpost 2005-10-29 17:58:40.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/redhat/initpost 2006-04-13 14:44:29.203012250 +0200 -@@ -52,7 +52,7 @@ $_VSERVER "$vserver" start --rescue bash - f=/tmp/startwait - trap "rm -f $f" EXIT - mkfifo $f -- ( sleep 10; kill -s 9 -- -1 ) & -+ ( sleep 15; kill -s 9 -- -1 ) & - cat "$f" >/dev/null - kill -s 9 -- -1 - wait -diff -NurpP util-vserver-0.30.210/scripts/vyum-worker util-vserver-0.30.210-fc5/scripts/vyum-worker ---- util-vserver-0.30.210/scripts/vyum-worker 2005-10-31 10:55:59.000000000 +0100 -+++ util-vserver-0.30.210-fc5/scripts/vyum-worker 2006-04-13 14:44:29.203012250 +0200 -@@ -39,8 +39,8 @@ test -z "$_YUM" || { - - yum=${YUM:-yum} - conf=yum.conf --case $(yum --version) in -- (2.[01234]*) -+case $($yum --version|tail -n 1) in -+ (2.[0123456]*) - python -c 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' &>/dev/null || { - warning "\ - You are using a version of yum which is insecure and broken in chroot diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-namespace-cleanup.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-namespace-cleanup.patch deleted file mode 100644 index 84440f8..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-namespace-cleanup.patch +++ /dev/null @@ -1,117 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 12_vnamespace_cleanup.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/doc/configuration.xml trunk/doc/configuration.xml ---- trunk~/doc/configuration.xml 2006-03-20 08:16:46.000000000 -0500 -+++ trunk/doc/configuration.xml 2006-04-05 23:18:43.000000000 -0400 -@@ -37,6 +37,14 @@ - </description> - </boolean> - -+ <boolean id="global-namespace-cleanup" name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup globally. It can be overridden for a single vserver -+by setting the <optionref ref="global-nonamespace-cleanup">nonamespace-cleanup</optionref> flag -+there. -+ </description> -+ </boolean> -+ - <link name="run.rev"> - <description> - Path of the vserver run reverse directory. This directory contains -@@ -344,6 +352,19 @@ - </description> - </boolean> - -+ <boolean id="global-nonamespace-cleanup" name="nonamespace-cleanup"> -+ <description> -+Overrides the global <optionref ref="global-namespace-cleanup">namespace-cleanup</optionref> flag and disables -+namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ -+ <boolean name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ - <hash name="schedule"> - <description> - [experimental; name is subject of possible change] Contains the -diff -urNad trunk~/scripts/functions trunk/scripts/functions ---- trunk~/scripts/functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/functions 2006-04-05 23:18:43.000000000 -0400 -@@ -480,6 +480,18 @@ - -e "$cfgdir"/nonamespace - } - -+function isNamespaceCleanup -+{ -+ local cfgdir -+ -+ $_VSERVER_INFO - FEATURE namespace || return 0 -+ cfgdir=$($_VSERVER_INFO "$1" CFGDIR) || return 0 -+ test -e "$cfgdir"/nonamespace-cleanup && return 0 -+ test -e "$__CONFDIR"/.defaults/namespace-cleanup -o \ -+ -e "$cfgdir"/namespace-cleanup && return 1 -+ return 0 -+} -+ - ## Usage: getAllVservers <var> [<KIND>*] - function getAllVservers - { -diff -urNad trunk~/scripts/vserver.functions trunk/scripts/vserver.functions ---- trunk~/scripts/vserver.functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/vserver.functions 2006-04-05 23:19:01.000000000 -0400 -@@ -743,13 +743,13 @@ - - test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir" - -- test -z "$NAMESPACE_CLEANUP" || isAvoidNamespace "$cfgdir" || \ -- $_VNAMESPACE --cleanup -- - _mountVserverInternal "$cfgdir"/fstab - _mountVserverInternal "$cfgdir"/fstab.local - _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" - -+ isNamespaceCleanup "$cfgdir" || \ -+ _namespaceCleanup -+ - isAvoidNamespace "$cfgdir" || \ - $_SECURE_MOUNT --rbind -n "$vdir" "/" - } -@@ -1099,3 +1099,29 @@ - _saveSingleDiskLimit "$vdir" "$dlimit" - done - } -+ -+function _namespaceCleanup -+{ -+ local root=$(readlink -f "$vdir") -+ local tmp="$root" -+ local list="" -+ while [ "$tmp" ]; do -+ list="$list $tmp" -+ tmp="${tmp%/*}" -+ done -+ local list_umount="" -+ while read dev path opts; do -+ [ "$path" ] || continue -+ for i in $root /dev /proc; do -+ [ "${path#$i}" != "$path" ] && continue 2 -+ done -+ for i in $list /; do -+ [ "$path" = "$i" ] && continue 2 -+ done -+ list_umount="$path $list_umount" -+ done < /proc/mounts -+ for i in $list_umount; do -+ umount $i -+ done -+} -+ diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-usage.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-usage.patch deleted file mode 100644 index a63deca..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-usage.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.usage/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.usage/scripts/vserver 2006-04-13 13:44:37.000000000 +0200 -@@ -271,7 +271,7 @@ case "$2" in - fi - ;; - (*) -- echo $"Usage: $0 {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 -+ echo $"Usage: $0 <vserver> {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 - exit 2 - ;; - esac diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-vcontext-uid.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-vcontext-uid.patch deleted file mode 100644 index ae36e0b..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-vcontext-uid.patch +++ /dev/null @@ -1,134 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc 2006-01-21 18:55:36.000000000 +0100 -+++ util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc 2006-04-10 22:47:45.000000000 +0200 -@@ -156,6 +156,12 @@ Esetgroups(size_t size, const gid_t *lis - { - FatalErrnoError(setgroups(size, list)==-1, "setgroups()"); - } -+ -+inline static void -+Einitgroups(const char *user, gid_t group) -+{ -+ FatalErrnoError(initgroups(user, group)==-1, "initgroups()"); -+} - #endif - - inline static WRAPPER_DECL int -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.vcontext-uid/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/scripts/vserver 2006-04-10 22:49:41.000000000 +0200 -@@ -212,15 +212,15 @@ case "$2" in - ;; - (exec) - shift 2 -- suexec root "$@" -+ suexec 0 "$@" - ;; - (chkconfig) - shift 2 -- suexec root chkconfig "$@" -+ suexec 0 chkconfig "$@" - ;; - (enter) - getEnterShell "$VSERVER_DIR" -- suexec root "${ENTER_SHELL[@]}" -+ suexec 0 "${ENTER_SHELL[@]}" - ;; - (running) - isVserverRunning "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210.vcontext-uid/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/src/vcontext.c 2006-04-10 22:49:20.000000000 +0200 -@@ -1,6 +1,6 @@ - // $Id: vcontext.c,v 1.18 2005/04/28 18:08:12 ensc Exp $ --*- c -*-- - --// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - // - // 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 -@@ -33,6 +33,9 @@ - #include <sys/un.h> - #include <assert.h> - #include <signal.h> -+#include <sys/types.h> -+#include <pwd.h> -+#include <grp.h> - - #include <linux/personality.h> - -@@ -104,7 +107,7 @@ struct Arguments { - uint_least32_t personality_type; - int verbosity; - bool do_chroot; -- uid_t uid; -+ char const * uid; - xid_t xid; - char const * sync_sock; - char const * sync_msg; -@@ -159,7 +162,7 @@ showVersion() - WRITE_MSG(1, - "vcontext " VERSION " -- manages the creation of security contexts\n" - "This program is part of " PACKAGE_STRING "\n\n" -- "Copyright (C) 2004 Enrico Scholz\n" -+ "Copyright (C) 2004-2006 Enrico Scholz\n" - VERSION_COPYRIGHT_DISCLAIMER); - exit(0); - } -@@ -275,9 +278,35 @@ doit(struct Arguments const *args, char - if (args->do_migrate && !args->do_migrateself) - Evc_ctx_migrate(xid); - -- if (args->uid!=(uid_t)(-1) && getuid()!=args->uid) { -- Esetuid(args->uid); -- if (getuid()!=args->uid) { -+ if (args->uid != NULL) { -+ uid_t uid = 0; -+ unsigned long tmp; -+ -+ if (!isNumberUnsigned(args->uid, &tmp, false)) { -+#ifdef __dietlibc__ -+ struct passwd *pw; -+ pw = getpwnam(args->uid); -+ if (pw == NULL) { -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Username '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' does not exist\n"); -+ return wrapper_exit_code; -+ } -+ uid = pw->pw_uid; -+ Einitgroups(args->uid, pw->pw_gid); -+ Esetgid(pw->pw_gid); -+#else -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Uid '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' is not a number\n"); -+ return wrapper_exit_code; -+#endif -+ } -+ else -+ uid = (uid_t) tmp; -+ -+ Esetuid((uid_t) uid); -+ if (getuid()!=uid) { - WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Something went wrong while changing the UID\n"); - exit(wrapper_exit_code); - } -@@ -345,7 +374,7 @@ int main (int argc, char *argv[]) - .is_silentexist = false, - .set_namespace = false, - .verbosity = 1, -- .uid = -1, -+ .uid = NULL, - .xid = VC_DYNAMIC_XID, - .personality_type = VC_BAD_PERSONALITY, - .personality_flags = 0, -@@ -369,7 +398,7 @@ int main (int argc, char *argv[]) - case CMD_SILENTEXIST : args.is_silentexist = true; break; - case CMD_SYNCSOCK : args.sync_sock = optarg; break; - case CMD_SYNCMSG : args.sync_msg = optarg; break; -- case CMD_UID : args.uid = atol(optarg); break; -+ case CMD_UID : args.uid = optarg; break; - case CMD_XID : args.xid = Evc_xidopt2xid(optarg,true); break; - case CMD_SILENT : --args.verbosity; break; - case CMD_PERSTYPE : diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index 4e23352..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,501 +0,0 @@ -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers.h util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h 2006-04-07 12:12:36.912449000 +0200 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc 2006-04-07 12:12:36.916449000 +0200 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -NurpP util-vserver-0.30.210/Makefile.in util-vserver-0.30.210-vlogin/Makefile.in ---- util-vserver-0.30.210/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/Makefile.in 2006-04-07 12:12:36.944451000 +0200 -@@ -965,7 +965,7 @@ src_testsuite_vunify_functest_DEPENDENCI - am_src_vattribute_OBJECTS = src/vattribute.$(OBJEXT) - src_vattribute_OBJECTS = $(am_src_vattribute_OBJECTS) - src_vattribute_DEPENDENCIES = $(am__DEPENDENCIES_11) --am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) -+am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) src/vlogin.$(OBJEXT) - src_vcontext_OBJECTS = $(am_src_vcontext_OBJECTS) - src_vcontext_DEPENDENCIES = $(am__DEPENDENCIES_11) \ - $(am__DEPENDENCIES_9) -@@ -1746,7 +1746,7 @@ src_chbind_LDFLAGS = $(VSERVER_LDFLGS) - src_chcontext_compat_SOURCES = src/chcontext.c - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - src_vsched_SOURCES = src/vsched.c -@@ -3489,6 +3489,8 @@ src/vattribute$(EXEEXT): $(src_vattribut - $(LINK) $(src_vattribute_LDFLAGS) $(src_vattribute_OBJECTS) $(src_vattribute_LDADD) $(LIBS) - src/vcontext.$(OBJEXT): src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -+src/vlogin.$(OBJEXT): src/$(am__dirstamp) \ -+ src/$(DEPDIR)/$(am__dirstamp) - src/vcontext$(EXEEXT): $(src_vcontext_OBJECTS) $(src_vcontext_DEPENDENCIES) src/$(am__dirstamp) - @rm -f src/vcontext$(EXEEXT) - $(LINK) $(src_vcontext_LDFLAGS) $(src_vcontext_OBJECTS) $(src_vcontext_LDADD) $(LIBS) -@@ -4222,6 +4224,7 @@ mostlyclean-compile: - -rm -f src/vdu.$(OBJEXT) - -rm -f src/vhashify.$(OBJEXT) - -rm -f src/vlimit.$(OBJEXT) -+ -rm -f src/vlogin.$(OBJEXT) - -rm -f src/vnamespace.$(OBJEXT) - -rm -f src/vps.$(OBJEXT) - -rm -f src/vreboot.$(OBJEXT) -@@ -4593,6 +4596,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdu.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vhashify.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlimit.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlogin.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vnamespace.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vps.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vreboot.Po@am__quote@ -diff -NurpP util-vserver-0.30.210/scripts/vserver.functions util-vserver-0.30.210-vlogin/scripts/vserver.functions ---- util-vserver-0.30.210/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/scripts/vserver.functions 2006-04-07 12:12:36.944451000 +0200 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -NurpP util-vserver-0.30.210/src/Makefile-files util-vserver-0.30.210-vlogin/src/Makefile-files ---- util-vserver-0.30.210/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/Makefile-files 2006-04-07 12:12:36.952452000 +0200 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -NurpP util-vserver-0.30.210/src/vcontext.c util-vserver-0.30.210-vlogin/src/vcontext.c ---- util-vserver-0.30.210/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210-vlogin/src/vcontext.c 2006-04-07 16:54:41.962816000 +0200 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(int argc, char *argv[], int ind); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -233,7 +239,7 @@ doExternalSync(int fd, char const *msg) - } - - static inline ALWAYSINLINE int --doit(struct Arguments const *args, char *argv[]) -+doit(struct Arguments const *args, int argc, char *argv[]) - { - int p[2][2]; - pid_t pid = initSync(p, args->do_disconnect); -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argc, argv, optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -@@ -408,7 +419,7 @@ int main (int argc, char *argv[]) - else if (optind>=argc) - WRITE_MSG(2, "No command given; use '--help' for more information.\n"); - else -- return doit(&args, argv); -+ return doit(&args, argc, argv); - - return wrapper_exit_code; - } -diff -NurpP util-vserver-0.30.210/src/vlogin.c util-vserver-0.30.210-vlogin/src/vlogin.c ---- util-vserver-0.30.210/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/vlogin.c 2006-04-07 16:55:29.201768250 +0200 -@@ -0,0 +1,281 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <strings.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* convert terminal settings to raw mode */ -+ cfmakeraw(&buf); -+ -+ /* apply raw terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activities */ -+static void -+terminal_copy(int src, int dst) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(src, buf, sizeof(buf)); -+ -+ /* write activity to user */ -+ EwriteAll(dst, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(int argc, char *argv[], int ind) -+{ -+ int slave; -+ pid_t pid; -+ int n, i; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[ind], argv+ind); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[ind], argv+ind); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* set process title for ps */ -+ n = strlen(argv[0]); -+ -+ for (i = 0; i < argc; i++) -+ bzero(argv[i], strlen(argv[i])); -+ -+ strncpy(argv[0], "login", n); -+ -+ /* reset terminal to its original mode */ -+ atexit(terminal_reset); -+ -+ /* we want a redraw */ -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ terminal_copy(STDIN_FILENO, t.fd); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_copy(t.fd, STDOUT_FILENO); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r12/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index a528752..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/legacy/vserver util-vserver-0.30.210.nice/scripts/legacy/vserver ---- util-vserver-0.30.210.orig/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/legacy/vserver 2006-04-13 02:34:40.000000000 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.nice/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/vserver.functions 2006-04-13 02:35:35.000000000 +0200 -@@ -98,12 +98,11 @@ function _generateChbindOptions - function _generateNiceCommand - { - local vdir=$1 -- local nice -+ local nice=0 - -- test -r "$vdir/nice" || return 0; -- read nice <"$vdir"/nice -+ test -r "$vdir/nice" && read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 57737fc..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc util-vserver-0.30.210/lib/syscall_setccaps-v13.hc ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2006-03-12 22:01:36.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-12 22:02:23.000000000 +0100 -@@ -25,7 +25,7 @@ vc_set_ccaps_v13(xid_t xid, struct vc_ct - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ k_caps.bcaps = (caps->bcaps & caps->bmask) | ~caps->bmask; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-chcontext.8.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-chcontext.8.patch deleted file mode 100644 index bf09182..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-chcontext.8.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: util-vserver-0.30.210/man/chcontext.8 -=================================================================== ---- util-vserver-0.30.210.orig/man/chcontext.8 -+++ util-vserver-0.30.210/man/chcontext.8 -@@ -1,4 +1,4 @@ --.TH "chcontext" "1" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" -+.TH "chcontext" "8" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" - .SH "NAME" - .LP - chcontext \- chcontext allocates a new security context and executes a command in that context. diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-clone-arch.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-clone-arch.patch deleted file mode 100644 index fbbdb51..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-clone-arch.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib_internal/sys_clone.h util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h ---- util-vserver-0.30.210.orig/lib_internal/sys_clone.h 2005-04-28 20:01:37.000000000 +0200 -+++ util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h 2006-04-10 23:43:29.000000000 +0200 -@@ -19,33 +19,54 @@ - #ifndef H_UTIL_VSERVER_SRC_SYS_CLONE_H - #define H_UTIL_VSERVER_SRC_SYS_CLONE_H - -+#include <unistd.h> - #include "lib/syscall-wrap.h" --#define __NR_sys_clone __NR_clone -+#define __NR__sys_clone __NR_clone - - #ifndef CLONE_NEWNS - # define CLONE_NEWNS 0x00020000 - #endif - --#ifdef ENSC_SYSCALL_TRADITIONAL --#include <unistd.h> -+#ifndef ENSC_SYSCALL_TRADITIONAL -+# include <errno.h> - -+# if defined(__s390__) - inline static UNUSED ALWAYSINLINE --int sys_clone(int flags, void *stack) -+_syscall2(int, _sys_clone, void *, child_stack, int, flags) -+# else -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, int, flags, void *, child_stack) -+# endif -+#endif -+ -+inline static UNUSED ALWAYSINLINE -+int sys_clone(int flags, void *child_stack) - { --#if defined __dietlibc__ -+ int ret; -+#ifdef __sparc__ -+ int parent = getpid(); -+#endif -+#if defined(__dietlibc__) && defined(ENSC_SYSCALL_TRADITIONAL) - extern long int syscall (long int __sysno, ...); - #endif -- -- return syscall(__NR_sys_clone, flags, stack); --} --#else --#include <errno.h> - --inline static UNUSED ALWAYSINLINE --_syscall2(int, sys_clone, int, flags, void *, child_stack) -+#if defined(__s390__) && defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, child_stack, flags); -+#elif defined(__s390__) -+ ret = _sys_clone(child_stack, flags); -+#elif defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, flags, child_stack); -+#else -+ ret = _sys_clone(flags, child_stack); -+#endif -+#ifdef __sparc__ -+ if (ret == parent) -+ ret = 0; - #endif -+ return ret; -+} - --#undef __NR_sys_clone -+#undef __NR__sys_clone - - #define ENSC_HAVE_SYSCLONE 1 - diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-clone.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-clone.patch deleted file mode 100644 index 9bb46be..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-clone.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst 2006-03-16 01:48:57.000000000 +0100 -@@ -7,6 +7,7 @@ build @PKGLIBDIR@/vserver-build.skeleto - build @PKGLIBDIR@/vserver-build.debootstrap - build @PKGLIBDIR@/vserver-build.yum - build @PKGLIBDIR@/vserver-build.rpm -+build @PKGLIBDIR@/vserver-build.clone - build @PKGLIBDIR@/vserver-build.functions - build @PKGLIBDIR@/vserver-build.functions.apt - build @PKGLIBDIR@/vserver-build.functions.rpm -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.clone/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/Makefile-files 2006-03-16 02:08:32.000000000 +0100 -@@ -43,6 +43,7 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver-build.debootstrap \ - scripts/vserver-build.rpm \ - scripts/vserver-build.yum \ -+ scripts/vserver-build.clone \ - scripts/vserver-build.functions \ - scripts/vserver-build.functions.apt \ - scripts/vserver-build.functions.rpm \ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build util-vserver-0.30.210.clone/scripts/vserver-build ---- util-vserver-0.30.210.orig/scripts/vserver-build 2005-07-03 19:45:43.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/vserver-build 2006-03-16 01:48:36.000000000 +0100 -@@ -126,7 +126,7 @@ setup_setDefaults "$VSERVER_NAME" - - case x"$method" in - (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; -- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm) -+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone) - . $__PKGLIBDIR/vserver-build.$method - ;; - (x) panic $"No build-method specified";; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build.clone util-vserver-0.30.210.clone/scripts/vserver-build.clone ---- util-vserver-0.30.210.orig/scripts/vserver-build.clone 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.clone/scripts/vserver-build.clone 2006-03-16 02:08:07.000000000 +0100 -@@ -0,0 +1,60 @@ -+# $Id$ --*- sh -*-- -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+tmp=$(getopt -o '+d:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+DISTRIBUTION=: -+use_pkgmgmt= -+source= -+ -+while true; do -+ case "$1" in -+ -d) DISTRIBUTION=$2; shift;; -+ --debug) set -x;; -+ --pkgmgmt) use_pkgmgmt=1;; -+ --source) source=$2; shift;; -+ --) shift; break ;; -+ *) echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2 -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+test -z "$source" && panic $"vserver-build.clone: --source <vserver> is required!" -+ -+getDistribution '' 1 -+ -+base.init -+test -z "$use_pkgmgmt" || pkgmgmt.initVariables -+ -+base.initFilesystem "$OPTION_FORCE" -+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE" -+ -+setup_writeOption "$VSERVER_NAME" -+setup_writeInitialFstab -+ -+$_CP -a "$__CONFDIR/$source/vdir/." "$VDIR" -+ -+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+test -z "$1" || "$@" -+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+base.setSuccess diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-condrestart.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-condrestart.patch deleted file mode 100644 index cdd8cde..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-condrestart.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.condrestart/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.condrestart/scripts/vserver 2006-04-13 02:10:28.000000000 +0200 -@@ -208,7 +208,7 @@ case "$2" in - $cmd "$@" - ;; - (condrestart) -- test ! isVserverRunning "$VSERVER_DIR" || restart -+ ! isVserverRunning "$VSERVER_DIR" || restart - ;; - (exec) - shift 2 diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-cpuset.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-cpuset.patch deleted file mode 100644 index 9f21a83..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-cpuset.patch +++ /dev/null @@ -1,175 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.cpuset/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.functions 2006-04-13 01:36:34.000000000 +0200 -@@ -690,6 +690,54 @@ function generateOptions - fi - } - -+function addtoCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ local i -+ local configured=0 -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ test -d /dev/cpuset/"$cpuset" || mkdir /dev/cpuset/"$cpuset" || configured=1 -+ for i in cpus mems cpu_exclusive mem_exclusive virtualize; do -+ if test -e "$f"/"$i"; then -+ cat "$f"/"$i" >/dev/cpuset/"$cpuset"/"$i" 2>/dev/null || { -+ configured=1 -+ break -+ } -+ fi -+ done -+ } -+ -+ echo $$ >/dev/cpuset/"$cpuset"/tasks || configured=1 -+ if [ "$configured" -ne 0 ]; then -+ warning $"\ -+WARNING: Failed to create or CPUSET \"$cpuset\" does not exist! Not using it!" >&2 -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ return 0 -+ fi -+} -+ -+function removeCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ } -+} -+ - function _mountVserverInternal - { - local fstab="$1" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-setup.functions util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions ---- util-vserver-0.30.210.orig/scripts/vserver-setup.functions 2006-01-03 00:50:21.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions 2006-04-13 01:39:08.000000000 +0200 -@@ -24,11 +24,15 @@ SETUP_LOCKFILE= - SETUP_CONFDIR= - SETUP_CONTEXT= - SETUP_INITSTYLE= -+SETUP_CPUSET= -+SETUP_CPUSETCPUS= -+SETUP_CPUSETMEMS= -+SETUP_CPUSETVIRT= - - declare -a SETUP_INTERFACES=() - declare -a SETUP_FLAGS=() - --declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:" -+declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:,cpuset:,cpusetcpus:,cpusetmems:,cpusetvirt" - declare -r SETUP_HELPMSG=$" - --context ... the static context of the vserver [default: none; a dynamic - context will be assumed] -@@ -55,6 +59,19 @@ declare -r SETUP_HELPMSG=$" - this becomes a per vserver limit) - private: No other process can join this security context. - Even root -+ --cpuset <name> -+ ... declares the CPUSET this vserver will run in [default: none] -+ --cpusetcpus <number[-number][:<exclusive>]> -+ ... sets which cpus belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those cpus -+ --cpusetmems <number[-number][:<exclusive>]> -+ ... sets which memory pools belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those memory pools -+ --cpusetvirt -+ ... virtualize cpuset (guest will see only CPUs defined in cpuset) -+ Requires kernel patch from http://www.bullopensource.org/cpuset/ - --initstyle <style> - ... configures the initstyle (e.g. minit,sysv,plain) - " -@@ -71,7 +88,23 @@ function setup_setOption2 - (--netprefix) SETUP_NETPREFIX=$2;; - (--netbcast) SETUP_NETBCAST=$2;; - (--interface) SETUP_INTERFACES=( "${SETUP_INTERFACES[@]}" "$2" );; -- (--initstyle) SETUP_INITSTYLE=$2;; -+ (--initstyle) SETUP_INITSTYLE=$2;; -+ (--cpuset) SETUP_CPUSET=$2;; -+ (--cpusetcpus) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETCPUS=$1 -+ SETUP_CPUSETCPUSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetmems) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETMEMS=$1 -+ SETUP_CPUSETMEMSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetvirt) SETUP_CPUSETVIRT=1;; - (--flags) old_IFS=$IFS - IFS=, - set -- $2 -@@ -140,7 +173,7 @@ function setup_writeOption - local cfgdir=${SETUP_CONFDIR:?} - local i - -- mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts -+ mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts "$cfgdir"/cpuset - - _setup_writeSingleOption "$name" "$cfgdir"/name - _setup_writeSingleOption "$SETUP_CONTEXT" "$cfgdir"/context -@@ -150,6 +183,12 @@ function setup_writeOption - _setup_writeSingleOption "$SETUP_NETPREFIX" "$cfgdir"/interfaces/prefix - _setup_writeSingleOption "$SETUP_NETBCAST" "$cfgdir"/interfaces/bcast - _setup_writeSingleOption "$SETUP_INITSTYLE" "$cfgdir"/apps/init/style -+ _setup_writeSingleOption "$SETUP_CPUSET" "$cfgdir"/cpuset/name -+ _setup_writeSingleOption "$SETUP_CPUSETCPUS" "$cfgdir"/cpuset/cpus -+ _setup_writeSingleOption "$SETUP_CPUSETCPUSEXCL" "$cfgdir"/cpuset/cpus_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETMEMS" "$cfgdir"/cpuset/mems -+ _setup_writeSingleOption "$SETUP_CPUSETMEMSEXCL" "$cfgdir"/cpuset/mem_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETVIRT" "$cfgdir"/cpuset/virtualize - - local idx=0 - for i in "${SETUP_INTERFACES[@]}"; do -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.start util-vserver-0.30.210.cpuset/scripts/vserver.start ---- util-vserver-0.30.210.orig/scripts/vserver.start 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.start 2006-04-13 01:36:34.000000000 +0200 -@@ -113,6 +113,7 @@ enableInterfaces "$VSERVER_DIR" && have_ - - mountVserver "$VSERVER_DIR" && is_mounted=1 - prepareInit "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - pushd "$VSERVER_DIR"/vdir/ >/dev/null - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-start -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.stop util-vserver-0.30.210.cpuset/scripts/vserver.stop ---- util-vserver-0.30.210.orig/scripts/vserver.stop 2006-01-21 14:22:23.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.stop 2006-04-13 01:36:34.000000000 +0200 -@@ -101,3 +101,4 @@ disableInterfaces "$VSERVER_DIR" - saveDiskLimits "$VSERVER_DIR" - - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" postpost-stop -+removeCPUSET "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.suexec util-vserver-0.30.210.cpuset/scripts/vserver.suexec ---- util-vserver-0.30.210.orig/scripts/vserver.suexec 2005-07-15 21:01:06.000000000 +0200 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.suexec 2006-04-13 01:36:34.000000000 +0200 -@@ -22,6 +22,7 @@ test -z "$is_stopped" -o "$OPTION_INSECU - exit 1 - } - generateOptions "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - user=$1 - shift diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-debootstrap-script.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-debootstrap-script.patch deleted file mode 100644 index f435c7e..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-debootstrap-script.patch +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 05_vserver-build_dbootstrap_script.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/scripts/vserver-build trunk/scripts/vserver-build ---- trunk~/scripts/vserver-build 2006-03-20 10:28:10.000000000 -0500 -+++ trunk/scripts/vserver-build 2006-03-20 10:31:30.000000000 -0500 -@@ -64,7 +64,7 @@ - skeleton ... -- [<cmd> <args>*] - ... installs a minimal skeleton filesystem, creates the - configuration file and calls an optional command then -- debootstrap ... -- -d <distribution> [-m <mirror>] [-- <debootstrap-options>*] -+ debootstrap ... -- -d <distribution> [-m <mirror>] [-s <script> ] [-- <debootstrap-options>*] - bootstraps the vserver with Debian's 'debootstrap' package - - Please report bugs to $PACKAGE_BUGREPORT" -diff -urNad trunk~/scripts/vserver-build.debootstrap trunk/scripts/vserver-build.debootstrap ---- trunk~/scripts/vserver-build.debootstrap 2006-03-20 10:31:13.000000000 -0500 -+++ trunk/scripts/vserver-build.debootstrap 2006-03-20 10:33:08.000000000 -0500 -@@ -121,7 +121,8 @@ - ### main starts here <--- - - --tmp=$(getopt -o '+d:m:' --long debug -n "$0" -- "$@") || exit 1 -+#Parameter s added for debootstrap use -+tmp=$(getopt -o '+d:m:s:' --long debug -n "$0" -- "$@") || exit 1 - eval set -- "$tmp" - - init -@@ -130,6 +131,8 @@ - case "$1" in - (-d) DISTRIBUTION=$2; shift;; - (-m) mirror=$2; shift;; -+#Parameter s added for debootstrap scripts -+ (-s) script=$2; shift;; - (--debug) set -x;; - (--) shift; break ;; - (*) echo "vserver-build.debootstrap: internal error: unrecognized option '$1'" >&2 -@@ -151,7 +154,8 @@ - - test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - mv "$VDIR"/dev "$VDIR"/dev.X --"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" || : ## HACK: ignore all errors... -+#this adds the variable $script to the debootstrap call -+"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" "$script" || : ## HACK: ignore all errors... - fixupDebian "$VDIR" - test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-delete.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-delete.patch deleted file mode 100644 index c7b04d9..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-delete.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst 2006-03-25 00:33:26.000000000 +0100 -@@ -18,6 +18,7 @@ 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 - core @PKGLIBDIR@/util-vserver-vars - build @PKGLIBDIR@/rpm-fake.so - legacy @LEGACYDIR@/save_s_context -diff -Nurp util-vserver-0.30.210.orig/Makefile.in util-vserver-0.30.210.delete/Makefile.in ---- util-vserver-0.30.210.orig/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210.delete/Makefile.in 2006-04-06 19:50:42.000000000 +0200 -@@ -1927,7 +1927,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \ -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.delete/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/Makefile-files 2006-03-25 00:31:07.000000000 +0100 -@@ -52,7 +52,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.delete/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/vserver 2006-03-23 23:07:03.000000000 +0100 -@@ -57,6 +57,7 @@ Possible commands are: - - build <buildopts>* - ... builds a new vserver from scratch -+ delete ... remove a vserver - - unify [-R] - ... (de)unify vserver -@@ -199,7 +200,7 @@ test "$2" != start -o -n "$OPTION_NONAME - - . $__PKGLIBDIR/vserver.functions - case "$2" in -- (start|stop) -+ (start|stop|delete) - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.delete util-vserver-0.30.210.delete/scripts/vserver.delete ---- util-vserver-0.30.210.orig/scripts/vserver.delete 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.delete/scripts/vserver.delete 2006-03-25 00:49:35.000000000 +0100 -@@ -0,0 +1,34 @@ -+#! /bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS" -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+if test -z "$OPTION_SILENT" ; then -+ read -p "Are you sure you want to delete the vserver $vserver (y/N) " deleteok -+ if [[ ${deleteok} != [Yy] ]]; then -+ exit 2 -+ fi -+fi -+ -+isVserverRunning "$VSERVER_DIR" && -+ "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ -+base.init -+pkgmgmt.initVariables -+rm -rf "`readlink -f "$VSERVER_DIR"/vdir`" "$VSERVER_DIR" "$PKGCFGDIR" diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-fc5.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-fc5.patch deleted file mode 100644 index 895206c..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-fc5.patch +++ /dev/null @@ -1,403 +0,0 @@ -diff -NurpP util-vserver-0.30.210/distrib/centos42/pkgs/03 util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 ---- util-vserver-0.30.210/distrib/centos42/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 2006-04-13 14:44:32.579223250 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.579223250 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for CentOS 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/centos4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc4/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 ---- util-vserver-0.30.210/distrib/fc4/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities ---- util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities 2006-04-13 14:44:29.159009500 +0200 -@@ -0,0 +1,7 @@ -+Essential: -+ basesystem -+ coreutils -+ filesystem -+ glibc -+ setup -+ fedora-release -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/sources.list util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list ---- util-vserver-0.30.210/distrib/fc5/apt/sources.list 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+# rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates -+ -+# rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates -+# rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates -+# rpm http://download.fedora.us/fedora/fedora 3/i386 os updates -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/01 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 ---- util-vserver-0.30.210/distrib/fc5/pkgs/01 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1 @@ -+glibc -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/02 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 ---- util-vserver-0.30.210/distrib/fc5/pkgs/02 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,3 @@ -+--reinstall -+ -+filesystem -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 ---- util-vserver-0.30.210/distrib/fc5/pkgs/03 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+coreutils -+initscripts -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst ---- util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+basesystem-*.rpm -+filesystem-*.rpm -+glibc-common-*.rpm -+glibc-[0-9]*.rpm -+libgcc-[0-9]*.rpm -+setup-*.rpm -+tzdata-*.rpm -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum/yum.conf util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf ---- util-vserver-0.30.210/distrib/fc5/yum/yum.conf 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,10 @@ -+[main] -+cachedir=@YUMCACHEDIR@ -+reposdir=@YUMETCDIR@/yum.repos.d -+debuglevel=1 -+logfile=@YUMLOGDIR@/log -+lockfile=@YUMLOCKDIR@/yum.pid -+pkgpolicy=newest -+distroverpkg=fedora-release -+installonlypkgs= -+exactarch=0 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,6 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora Core 5 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc5-vps/ -+enabled=1 -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,21 @@ -+[core] -+name=Fedora Core 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/os/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-debuginfo] -+name=Fedora Core 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-source] -+name=Fedora Core 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo 2006-04-13 14:44:29.195011750 +0200 -@@ -0,0 +1,44 @@ -+# These packages are untested and still under development. This -+# repository is used for updates to test releases, and for -+# development of new releases. -+# -+# This repository can see significant daily turnover and major -+# functionality changes which cause unexpected problems with other -+# development packages. Please use these packages if you want to work -+# with the Fedora developers by testing these new development packages. -+# -+# fedora-test-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with new test releases. -+# -+# fedora-devel-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with developing new releases. -+# -+# More information is available at http://fedoraproject.org/wiki/Testing -+# -+# Reproducible and reportable issues should be filed at -+# http://bugzilla.redhat.com/. -+# -+# Product: Fedora Core -+# Version: devel -+ -+[development] -+name=Fedora Core - Development -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide -+enabled=0 -+gpgcheck=0 -+ -+[development-debuginfo] -+name=Fedora Core - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/debug/ -+enabled=0 -+gpgcheck=0 -+ -+[development-source] -+name=Fedora Core - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/ -+enabled=0 -+gpgcheck=0 -+ -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras-development] -+name=Fedora Extras - Development Tree -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-devel -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-debuginfo] -+name=Fedora Extras - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-source] -+name=Fedora Extras - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras] -+name=Fedora Extras 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-5 -+enabled=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-debuginfo] -+name=Fedora Extras 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-source] -+name=Fedora Extras 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,13 @@ -+[legacy-updates] -+name=Fedora Legacy 5 - $basearch - Updates -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-released-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -+ -+[legacy-testing] -+name=Fedora Legacy 5 - $basearch - Updates Testing -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates] -+name=Fedora Core 5 - $basearch - Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-debuginfo] -+name=Fedora Core 5 - $basearch - Updates - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-source] -+name=Fedora Core 5 - Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates-testing] -+name=Fedora Core 5 - $basearch - Test Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-debuginfo] -+name=Fedora Core 5 - $basearch - Test Updates Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-source] -+name=Fedora Core 5 - Test Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -diff -NurpP util-vserver-0.30.210/distrib/Makefile.am util-vserver-0.30.210-fc5/distrib/Makefile.am ---- util-vserver-0.30.210/distrib/Makefile.am 2005-10-28 19:53:49.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.am 2006-04-13 14:44:29.203012250 +0200 -@@ -40,13 +40,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -65,7 +68,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - - install-exec-hook: install-notify-xtra - install-data-hook: install-data-xtras -diff -NurpP util-vserver-0.30.210/distrib/Makefile.in util-vserver-0.30.210-fc5/distrib/Makefile.in ---- util-vserver-0.30.210/distrib/Makefile.in 2006-01-22 20:33:16.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.in 2006-04-13 14:44:29.203012250 +0200 -@@ -275,13 +275,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -297,7 +300,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - all: all-am - - .SUFFIXES: -@@ -444,7 +447,7 @@ CTAGS: - - - distdir: $(DISTFILES) -- $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template -+ $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/fc5/apt $(distdir)/fc5/pkgs $(distdir)/fc5/rpmlist.d $(distdir)/fc5/yum $(distdir)/fc5/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ -diff -NurpP util-vserver-0.30.210/distrib/redhat/initpost util-vserver-0.30.210-fc5/distrib/redhat/initpost ---- util-vserver-0.30.210/distrib/redhat/initpost 2005-10-29 17:58:40.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/redhat/initpost 2006-04-13 14:44:29.203012250 +0200 -@@ -52,7 +52,7 @@ $_VSERVER "$vserver" start --rescue bash - f=/tmp/startwait - trap "rm -f $f" EXIT - mkfifo $f -- ( sleep 10; kill -s 9 -- -1 ) & -+ ( sleep 15; kill -s 9 -- -1 ) & - cat "$f" >/dev/null - kill -s 9 -- -1 - wait -diff -NurpP util-vserver-0.30.210/scripts/vyum-worker util-vserver-0.30.210-fc5/scripts/vyum-worker ---- util-vserver-0.30.210/scripts/vyum-worker 2005-10-31 10:55:59.000000000 +0100 -+++ util-vserver-0.30.210-fc5/scripts/vyum-worker 2006-04-13 14:44:29.203012250 +0200 -@@ -39,8 +39,8 @@ test -z "$_YUM" || { - - yum=${YUM:-yum} - conf=yum.conf --case $(yum --version) in -- (2.[01234]*) -+case $($yum --version|tail -n 1) in -+ (2.[0123456]*) - python -c 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' &>/dev/null || { - warning "\ - You are using a version of yum which is insecure and broken in chroot diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-namespace-cleanup.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-namespace-cleanup.patch deleted file mode 100644 index 84440f8..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-namespace-cleanup.patch +++ /dev/null @@ -1,117 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 12_vnamespace_cleanup.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/doc/configuration.xml trunk/doc/configuration.xml ---- trunk~/doc/configuration.xml 2006-03-20 08:16:46.000000000 -0500 -+++ trunk/doc/configuration.xml 2006-04-05 23:18:43.000000000 -0400 -@@ -37,6 +37,14 @@ - </description> - </boolean> - -+ <boolean id="global-namespace-cleanup" name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup globally. It can be overridden for a single vserver -+by setting the <optionref ref="global-nonamespace-cleanup">nonamespace-cleanup</optionref> flag -+there. -+ </description> -+ </boolean> -+ - <link name="run.rev"> - <description> - Path of the vserver run reverse directory. This directory contains -@@ -344,6 +352,19 @@ - </description> - </boolean> - -+ <boolean id="global-nonamespace-cleanup" name="nonamespace-cleanup"> -+ <description> -+Overrides the global <optionref ref="global-namespace-cleanup">namespace-cleanup</optionref> flag and disables -+namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ -+ <boolean name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ - <hash name="schedule"> - <description> - [experimental; name is subject of possible change] Contains the -diff -urNad trunk~/scripts/functions trunk/scripts/functions ---- trunk~/scripts/functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/functions 2006-04-05 23:18:43.000000000 -0400 -@@ -480,6 +480,18 @@ - -e "$cfgdir"/nonamespace - } - -+function isNamespaceCleanup -+{ -+ local cfgdir -+ -+ $_VSERVER_INFO - FEATURE namespace || return 0 -+ cfgdir=$($_VSERVER_INFO "$1" CFGDIR) || return 0 -+ test -e "$cfgdir"/nonamespace-cleanup && return 0 -+ test -e "$__CONFDIR"/.defaults/namespace-cleanup -o \ -+ -e "$cfgdir"/namespace-cleanup && return 1 -+ return 0 -+} -+ - ## Usage: getAllVservers <var> [<KIND>*] - function getAllVservers - { -diff -urNad trunk~/scripts/vserver.functions trunk/scripts/vserver.functions ---- trunk~/scripts/vserver.functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/vserver.functions 2006-04-05 23:19:01.000000000 -0400 -@@ -743,13 +743,13 @@ - - test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir" - -- test -z "$NAMESPACE_CLEANUP" || isAvoidNamespace "$cfgdir" || \ -- $_VNAMESPACE --cleanup -- - _mountVserverInternal "$cfgdir"/fstab - _mountVserverInternal "$cfgdir"/fstab.local - _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" - -+ isNamespaceCleanup "$cfgdir" || \ -+ _namespaceCleanup -+ - isAvoidNamespace "$cfgdir" || \ - $_SECURE_MOUNT --rbind -n "$vdir" "/" - } -@@ -1099,3 +1099,29 @@ - _saveSingleDiskLimit "$vdir" "$dlimit" - done - } -+ -+function _namespaceCleanup -+{ -+ local root=$(readlink -f "$vdir") -+ local tmp="$root" -+ local list="" -+ while [ "$tmp" ]; do -+ list="$list $tmp" -+ tmp="${tmp%/*}" -+ done -+ local list_umount="" -+ while read dev path opts; do -+ [ "$path" ] || continue -+ for i in $root /dev /proc; do -+ [ "${path#$i}" != "$path" ] && continue 2 -+ done -+ for i in $list /; do -+ [ "$path" = "$i" ] && continue 2 -+ done -+ list_umount="$path $list_umount" -+ done < /proc/mounts -+ for i in $list_umount; do -+ umount $i -+ done -+} -+ diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-usage.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-usage.patch deleted file mode 100644 index a63deca..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-usage.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.usage/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.usage/scripts/vserver 2006-04-13 13:44:37.000000000 +0200 -@@ -271,7 +271,7 @@ case "$2" in - fi - ;; - (*) -- echo $"Usage: $0 {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 -+ echo $"Usage: $0 <vserver> {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 - exit 2 - ;; - esac diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-vcontext-uid.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-vcontext-uid.patch deleted file mode 100644 index ae36e0b..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-vcontext-uid.patch +++ /dev/null @@ -1,134 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc 2006-01-21 18:55:36.000000000 +0100 -+++ util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc 2006-04-10 22:47:45.000000000 +0200 -@@ -156,6 +156,12 @@ Esetgroups(size_t size, const gid_t *lis - { - FatalErrnoError(setgroups(size, list)==-1, "setgroups()"); - } -+ -+inline static void -+Einitgroups(const char *user, gid_t group) -+{ -+ FatalErrnoError(initgroups(user, group)==-1, "initgroups()"); -+} - #endif - - inline static WRAPPER_DECL int -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.vcontext-uid/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/scripts/vserver 2006-04-10 22:49:41.000000000 +0200 -@@ -212,15 +212,15 @@ case "$2" in - ;; - (exec) - shift 2 -- suexec root "$@" -+ suexec 0 "$@" - ;; - (chkconfig) - shift 2 -- suexec root chkconfig "$@" -+ suexec 0 chkconfig "$@" - ;; - (enter) - getEnterShell "$VSERVER_DIR" -- suexec root "${ENTER_SHELL[@]}" -+ suexec 0 "${ENTER_SHELL[@]}" - ;; - (running) - isVserverRunning "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210.vcontext-uid/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/src/vcontext.c 2006-04-10 22:49:20.000000000 +0200 -@@ -1,6 +1,6 @@ - // $Id: vcontext.c,v 1.18 2005/04/28 18:08:12 ensc Exp $ --*- c -*-- - --// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - // - // 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 -@@ -33,6 +33,9 @@ - #include <sys/un.h> - #include <assert.h> - #include <signal.h> -+#include <sys/types.h> -+#include <pwd.h> -+#include <grp.h> - - #include <linux/personality.h> - -@@ -104,7 +107,7 @@ struct Arguments { - uint_least32_t personality_type; - int verbosity; - bool do_chroot; -- uid_t uid; -+ char const * uid; - xid_t xid; - char const * sync_sock; - char const * sync_msg; -@@ -159,7 +162,7 @@ showVersion() - WRITE_MSG(1, - "vcontext " VERSION " -- manages the creation of security contexts\n" - "This program is part of " PACKAGE_STRING "\n\n" -- "Copyright (C) 2004 Enrico Scholz\n" -+ "Copyright (C) 2004-2006 Enrico Scholz\n" - VERSION_COPYRIGHT_DISCLAIMER); - exit(0); - } -@@ -275,9 +278,35 @@ doit(struct Arguments const *args, char - if (args->do_migrate && !args->do_migrateself) - Evc_ctx_migrate(xid); - -- if (args->uid!=(uid_t)(-1) && getuid()!=args->uid) { -- Esetuid(args->uid); -- if (getuid()!=args->uid) { -+ if (args->uid != NULL) { -+ uid_t uid = 0; -+ unsigned long tmp; -+ -+ if (!isNumberUnsigned(args->uid, &tmp, false)) { -+#ifdef __dietlibc__ -+ struct passwd *pw; -+ pw = getpwnam(args->uid); -+ if (pw == NULL) { -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Username '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' does not exist\n"); -+ return wrapper_exit_code; -+ } -+ uid = pw->pw_uid; -+ Einitgroups(args->uid, pw->pw_gid); -+ Esetgid(pw->pw_gid); -+#else -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Uid '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' is not a number\n"); -+ return wrapper_exit_code; -+#endif -+ } -+ else -+ uid = (uid_t) tmp; -+ -+ Esetuid((uid_t) uid); -+ if (getuid()!=uid) { - WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Something went wrong while changing the UID\n"); - exit(wrapper_exit_code); - } -@@ -345,7 +374,7 @@ int main (int argc, char *argv[]) - .is_silentexist = false, - .set_namespace = false, - .verbosity = 1, -- .uid = -1, -+ .uid = NULL, - .xid = VC_DYNAMIC_XID, - .personality_type = VC_BAD_PERSONALITY, - .personality_flags = 0, -@@ -369,7 +398,7 @@ int main (int argc, char *argv[]) - case CMD_SILENTEXIST : args.is_silentexist = true; break; - case CMD_SYNCSOCK : args.sync_sock = optarg; break; - case CMD_SYNCMSG : args.sync_msg = optarg; break; -- case CMD_UID : args.uid = atol(optarg); break; -+ case CMD_UID : args.uid = optarg; break; - case CMD_XID : args.xid = Evc_xidopt2xid(optarg,true); break; - case CMD_SILENT : --args.verbosity; break; - case CMD_PERSTYPE : diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index b04e384..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,455 +0,0 @@ -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers.h util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h 2006-04-07 12:12:36.912449000 +0200 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc 2006-04-07 12:12:36.916449000 +0200 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -NurpP util-vserver-0.30.210/scripts/vserver.functions util-vserver-0.30.210-vlogin/scripts/vserver.functions ---- util-vserver-0.30.210/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/scripts/vserver.functions 2006-04-07 12:12:36.944451000 +0200 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -NurpP util-vserver-0.30.210/src/Makefile-files util-vserver-0.30.210-vlogin/src/Makefile-files ---- util-vserver-0.30.210/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/Makefile-files 2006-04-07 12:12:36.952452000 +0200 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -NurpP util-vserver-0.30.210/src/vcontext.c util-vserver-0.30.210-vlogin/src/vcontext.c ---- util-vserver-0.30.210/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210-vlogin/src/vcontext.c 2006-04-07 16:54:41.962816000 +0200 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(int argc, char *argv[], int ind); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -233,7 +239,7 @@ doExternalSync(int fd, char const *msg) - } - - static inline ALWAYSINLINE int --doit(struct Arguments const *args, char *argv[]) -+doit(struct Arguments const *args, int argc, char *argv[]) - { - int p[2][2]; - pid_t pid = initSync(p, args->do_disconnect); -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argc, argv, optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -@@ -408,7 +419,7 @@ int main (int argc, char *argv[]) - else if (optind>=argc) - WRITE_MSG(2, "No command given; use '--help' for more information.\n"); - else -- return doit(&args, argv); -+ return doit(&args, argc, argv); - - return wrapper_exit_code; - } -diff -NurpP util-vserver-0.30.210/src/vlogin.c util-vserver-0.30.210-vlogin/src/vlogin.c ---- util-vserver-0.30.210/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/vlogin.c 2006-04-07 16:55:29.201768250 +0200 -@@ -0,0 +1,281 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <strings.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* convert terminal settings to raw mode */ -+ cfmakeraw(&buf); -+ -+ /* apply raw terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activities */ -+static void -+terminal_copy(int src, int dst) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(src, buf, sizeof(buf)); -+ -+ /* write activity to user */ -+ EwriteAll(dst, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(int argc, char *argv[], int ind) -+{ -+ int slave; -+ pid_t pid; -+ int n, i; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[ind], argv+ind); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[ind], argv+ind); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* set process title for ps */ -+ n = strlen(argv[0]); -+ -+ for (i = 0; i < argc; i++) -+ bzero(argv[i], strlen(argv[i])); -+ -+ strncpy(argv[0], "login", n); -+ -+ /* reset terminal to its original mode */ -+ atexit(terminal_reset); -+ -+ /* we want a redraw */ -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ terminal_copy(STDIN_FILENO, t.fd); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_copy(t.fd, STDOUT_FILENO); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r13/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index a528752..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/legacy/vserver util-vserver-0.30.210.nice/scripts/legacy/vserver ---- util-vserver-0.30.210.orig/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/legacy/vserver 2006-04-13 02:34:40.000000000 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.nice/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/vserver.functions 2006-04-13 02:35:35.000000000 +0200 -@@ -98,12 +98,11 @@ function _generateChbindOptions - function _generateNiceCommand - { - local vdir=$1 -- local nice -+ local nice=0 - -- test -r "$vdir/nice" || return 0; -- read nice <"$vdir"/nice -+ test -r "$vdir/nice" && read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 57737fc..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc util-vserver-0.30.210/lib/syscall_setccaps-v13.hc ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2006-03-12 22:01:36.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-12 22:02:23.000000000 +0100 -@@ -25,7 +25,7 @@ vc_set_ccaps_v13(xid_t xid, struct vc_ct - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ k_caps.bcaps = (caps->bcaps & caps->bmask) | ~caps->bmask; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-chcontext.8.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-chcontext.8.patch deleted file mode 100644 index bf09182..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-chcontext.8.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: util-vserver-0.30.210/man/chcontext.8 -=================================================================== ---- util-vserver-0.30.210.orig/man/chcontext.8 -+++ util-vserver-0.30.210/man/chcontext.8 -@@ -1,4 +1,4 @@ --.TH "chcontext" "1" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" -+.TH "chcontext" "8" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" - .SH "NAME" - .LP - chcontext \- chcontext allocates a new security context and executes a command in that context. diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-clone-arch.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-clone-arch.patch deleted file mode 100644 index fbbdb51..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-clone-arch.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib_internal/sys_clone.h util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h ---- util-vserver-0.30.210.orig/lib_internal/sys_clone.h 2005-04-28 20:01:37.000000000 +0200 -+++ util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h 2006-04-10 23:43:29.000000000 +0200 -@@ -19,33 +19,54 @@ - #ifndef H_UTIL_VSERVER_SRC_SYS_CLONE_H - #define H_UTIL_VSERVER_SRC_SYS_CLONE_H - -+#include <unistd.h> - #include "lib/syscall-wrap.h" --#define __NR_sys_clone __NR_clone -+#define __NR__sys_clone __NR_clone - - #ifndef CLONE_NEWNS - # define CLONE_NEWNS 0x00020000 - #endif - --#ifdef ENSC_SYSCALL_TRADITIONAL --#include <unistd.h> -+#ifndef ENSC_SYSCALL_TRADITIONAL -+# include <errno.h> - -+# if defined(__s390__) - inline static UNUSED ALWAYSINLINE --int sys_clone(int flags, void *stack) -+_syscall2(int, _sys_clone, void *, child_stack, int, flags) -+# else -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, int, flags, void *, child_stack) -+# endif -+#endif -+ -+inline static UNUSED ALWAYSINLINE -+int sys_clone(int flags, void *child_stack) - { --#if defined __dietlibc__ -+ int ret; -+#ifdef __sparc__ -+ int parent = getpid(); -+#endif -+#if defined(__dietlibc__) && defined(ENSC_SYSCALL_TRADITIONAL) - extern long int syscall (long int __sysno, ...); - #endif -- -- return syscall(__NR_sys_clone, flags, stack); --} --#else --#include <errno.h> - --inline static UNUSED ALWAYSINLINE --_syscall2(int, sys_clone, int, flags, void *, child_stack) -+#if defined(__s390__) && defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, child_stack, flags); -+#elif defined(__s390__) -+ ret = _sys_clone(child_stack, flags); -+#elif defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, flags, child_stack); -+#else -+ ret = _sys_clone(flags, child_stack); -+#endif -+#ifdef __sparc__ -+ if (ret == parent) -+ ret = 0; - #endif -+ return ret; -+} - --#undef __NR_sys_clone -+#undef __NR__sys_clone - - #define ENSC_HAVE_SYSCLONE 1 - diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-clone.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-clone.patch deleted file mode 100644 index 9bb46be..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-clone.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst 2006-03-16 01:48:57.000000000 +0100 -@@ -7,6 +7,7 @@ build @PKGLIBDIR@/vserver-build.skeleto - build @PKGLIBDIR@/vserver-build.debootstrap - build @PKGLIBDIR@/vserver-build.yum - build @PKGLIBDIR@/vserver-build.rpm -+build @PKGLIBDIR@/vserver-build.clone - build @PKGLIBDIR@/vserver-build.functions - build @PKGLIBDIR@/vserver-build.functions.apt - build @PKGLIBDIR@/vserver-build.functions.rpm -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.clone/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/Makefile-files 2006-03-16 02:08:32.000000000 +0100 -@@ -43,6 +43,7 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver-build.debootstrap \ - scripts/vserver-build.rpm \ - scripts/vserver-build.yum \ -+ scripts/vserver-build.clone \ - scripts/vserver-build.functions \ - scripts/vserver-build.functions.apt \ - scripts/vserver-build.functions.rpm \ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build util-vserver-0.30.210.clone/scripts/vserver-build ---- util-vserver-0.30.210.orig/scripts/vserver-build 2005-07-03 19:45:43.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/vserver-build 2006-03-16 01:48:36.000000000 +0100 -@@ -126,7 +126,7 @@ setup_setDefaults "$VSERVER_NAME" - - case x"$method" in - (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; -- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm) -+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone) - . $__PKGLIBDIR/vserver-build.$method - ;; - (x) panic $"No build-method specified";; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build.clone util-vserver-0.30.210.clone/scripts/vserver-build.clone ---- util-vserver-0.30.210.orig/scripts/vserver-build.clone 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.clone/scripts/vserver-build.clone 2006-03-16 02:08:07.000000000 +0100 -@@ -0,0 +1,60 @@ -+# $Id$ --*- sh -*-- -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+tmp=$(getopt -o '+d:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+DISTRIBUTION=: -+use_pkgmgmt= -+source= -+ -+while true; do -+ case "$1" in -+ -d) DISTRIBUTION=$2; shift;; -+ --debug) set -x;; -+ --pkgmgmt) use_pkgmgmt=1;; -+ --source) source=$2; shift;; -+ --) shift; break ;; -+ *) echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2 -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+test -z "$source" && panic $"vserver-build.clone: --source <vserver> is required!" -+ -+getDistribution '' 1 -+ -+base.init -+test -z "$use_pkgmgmt" || pkgmgmt.initVariables -+ -+base.initFilesystem "$OPTION_FORCE" -+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE" -+ -+setup_writeOption "$VSERVER_NAME" -+setup_writeInitialFstab -+ -+$_CP -a "$__CONFDIR/$source/vdir/." "$VDIR" -+ -+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+test -z "$1" || "$@" -+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+base.setSuccess diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-condrestart.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-condrestart.patch deleted file mode 100644 index cdd8cde..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-condrestart.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.condrestart/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.condrestart/scripts/vserver 2006-04-13 02:10:28.000000000 +0200 -@@ -208,7 +208,7 @@ case "$2" in - $cmd "$@" - ;; - (condrestart) -- test ! isVserverRunning "$VSERVER_DIR" || restart -+ ! isVserverRunning "$VSERVER_DIR" || restart - ;; - (exec) - shift 2 diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-cpuset.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-cpuset.patch deleted file mode 100644 index 9f21a83..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-cpuset.patch +++ /dev/null @@ -1,175 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.cpuset/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.functions 2006-04-13 01:36:34.000000000 +0200 -@@ -690,6 +690,54 @@ function generateOptions - fi - } - -+function addtoCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ local i -+ local configured=0 -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ test -d /dev/cpuset/"$cpuset" || mkdir /dev/cpuset/"$cpuset" || configured=1 -+ for i in cpus mems cpu_exclusive mem_exclusive virtualize; do -+ if test -e "$f"/"$i"; then -+ cat "$f"/"$i" >/dev/cpuset/"$cpuset"/"$i" 2>/dev/null || { -+ configured=1 -+ break -+ } -+ fi -+ done -+ } -+ -+ echo $$ >/dev/cpuset/"$cpuset"/tasks || configured=1 -+ if [ "$configured" -ne 0 ]; then -+ warning $"\ -+WARNING: Failed to create or CPUSET \"$cpuset\" does not exist! Not using it!" >&2 -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ return 0 -+ fi -+} -+ -+function removeCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ } -+} -+ - function _mountVserverInternal - { - local fstab="$1" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-setup.functions util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions ---- util-vserver-0.30.210.orig/scripts/vserver-setup.functions 2006-01-03 00:50:21.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions 2006-04-13 01:39:08.000000000 +0200 -@@ -24,11 +24,15 @@ SETUP_LOCKFILE= - SETUP_CONFDIR= - SETUP_CONTEXT= - SETUP_INITSTYLE= -+SETUP_CPUSET= -+SETUP_CPUSETCPUS= -+SETUP_CPUSETMEMS= -+SETUP_CPUSETVIRT= - - declare -a SETUP_INTERFACES=() - declare -a SETUP_FLAGS=() - --declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:" -+declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:,cpuset:,cpusetcpus:,cpusetmems:,cpusetvirt" - declare -r SETUP_HELPMSG=$" - --context ... the static context of the vserver [default: none; a dynamic - context will be assumed] -@@ -55,6 +59,19 @@ declare -r SETUP_HELPMSG=$" - this becomes a per vserver limit) - private: No other process can join this security context. - Even root -+ --cpuset <name> -+ ... declares the CPUSET this vserver will run in [default: none] -+ --cpusetcpus <number[-number][:<exclusive>]> -+ ... sets which cpus belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those cpus -+ --cpusetmems <number[-number][:<exclusive>]> -+ ... sets which memory pools belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those memory pools -+ --cpusetvirt -+ ... virtualize cpuset (guest will see only CPUs defined in cpuset) -+ Requires kernel patch from http://www.bullopensource.org/cpuset/ - --initstyle <style> - ... configures the initstyle (e.g. minit,sysv,plain) - " -@@ -71,7 +88,23 @@ function setup_setOption2 - (--netprefix) SETUP_NETPREFIX=$2;; - (--netbcast) SETUP_NETBCAST=$2;; - (--interface) SETUP_INTERFACES=( "${SETUP_INTERFACES[@]}" "$2" );; -- (--initstyle) SETUP_INITSTYLE=$2;; -+ (--initstyle) SETUP_INITSTYLE=$2;; -+ (--cpuset) SETUP_CPUSET=$2;; -+ (--cpusetcpus) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETCPUS=$1 -+ SETUP_CPUSETCPUSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetmems) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETMEMS=$1 -+ SETUP_CPUSETMEMSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetvirt) SETUP_CPUSETVIRT=1;; - (--flags) old_IFS=$IFS - IFS=, - set -- $2 -@@ -140,7 +173,7 @@ function setup_writeOption - local cfgdir=${SETUP_CONFDIR:?} - local i - -- mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts -+ mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts "$cfgdir"/cpuset - - _setup_writeSingleOption "$name" "$cfgdir"/name - _setup_writeSingleOption "$SETUP_CONTEXT" "$cfgdir"/context -@@ -150,6 +183,12 @@ function setup_writeOption - _setup_writeSingleOption "$SETUP_NETPREFIX" "$cfgdir"/interfaces/prefix - _setup_writeSingleOption "$SETUP_NETBCAST" "$cfgdir"/interfaces/bcast - _setup_writeSingleOption "$SETUP_INITSTYLE" "$cfgdir"/apps/init/style -+ _setup_writeSingleOption "$SETUP_CPUSET" "$cfgdir"/cpuset/name -+ _setup_writeSingleOption "$SETUP_CPUSETCPUS" "$cfgdir"/cpuset/cpus -+ _setup_writeSingleOption "$SETUP_CPUSETCPUSEXCL" "$cfgdir"/cpuset/cpus_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETMEMS" "$cfgdir"/cpuset/mems -+ _setup_writeSingleOption "$SETUP_CPUSETMEMSEXCL" "$cfgdir"/cpuset/mem_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETVIRT" "$cfgdir"/cpuset/virtualize - - local idx=0 - for i in "${SETUP_INTERFACES[@]}"; do -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.start util-vserver-0.30.210.cpuset/scripts/vserver.start ---- util-vserver-0.30.210.orig/scripts/vserver.start 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.start 2006-04-13 01:36:34.000000000 +0200 -@@ -113,6 +113,7 @@ enableInterfaces "$VSERVER_DIR" && have_ - - mountVserver "$VSERVER_DIR" && is_mounted=1 - prepareInit "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - pushd "$VSERVER_DIR"/vdir/ >/dev/null - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-start -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.stop util-vserver-0.30.210.cpuset/scripts/vserver.stop ---- util-vserver-0.30.210.orig/scripts/vserver.stop 2006-01-21 14:22:23.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.stop 2006-04-13 01:36:34.000000000 +0200 -@@ -101,3 +101,4 @@ disableInterfaces "$VSERVER_DIR" - saveDiskLimits "$VSERVER_DIR" - - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" postpost-stop -+removeCPUSET "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.suexec util-vserver-0.30.210.cpuset/scripts/vserver.suexec ---- util-vserver-0.30.210.orig/scripts/vserver.suexec 2005-07-15 21:01:06.000000000 +0200 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.suexec 2006-04-13 01:36:34.000000000 +0200 -@@ -22,6 +22,7 @@ test -z "$is_stopped" -o "$OPTION_INSECU - exit 1 - } - generateOptions "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - user=$1 - shift diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-debootstrap-script.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-debootstrap-script.patch deleted file mode 100644 index f435c7e..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-debootstrap-script.patch +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 05_vserver-build_dbootstrap_script.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/scripts/vserver-build trunk/scripts/vserver-build ---- trunk~/scripts/vserver-build 2006-03-20 10:28:10.000000000 -0500 -+++ trunk/scripts/vserver-build 2006-03-20 10:31:30.000000000 -0500 -@@ -64,7 +64,7 @@ - skeleton ... -- [<cmd> <args>*] - ... installs a minimal skeleton filesystem, creates the - configuration file and calls an optional command then -- debootstrap ... -- -d <distribution> [-m <mirror>] [-- <debootstrap-options>*] -+ debootstrap ... -- -d <distribution> [-m <mirror>] [-s <script> ] [-- <debootstrap-options>*] - bootstraps the vserver with Debian's 'debootstrap' package - - Please report bugs to $PACKAGE_BUGREPORT" -diff -urNad trunk~/scripts/vserver-build.debootstrap trunk/scripts/vserver-build.debootstrap ---- trunk~/scripts/vserver-build.debootstrap 2006-03-20 10:31:13.000000000 -0500 -+++ trunk/scripts/vserver-build.debootstrap 2006-03-20 10:33:08.000000000 -0500 -@@ -121,7 +121,8 @@ - ### main starts here <--- - - --tmp=$(getopt -o '+d:m:' --long debug -n "$0" -- "$@") || exit 1 -+#Parameter s added for debootstrap use -+tmp=$(getopt -o '+d:m:s:' --long debug -n "$0" -- "$@") || exit 1 - eval set -- "$tmp" - - init -@@ -130,6 +131,8 @@ - case "$1" in - (-d) DISTRIBUTION=$2; shift;; - (-m) mirror=$2; shift;; -+#Parameter s added for debootstrap scripts -+ (-s) script=$2; shift;; - (--debug) set -x;; - (--) shift; break ;; - (*) echo "vserver-build.debootstrap: internal error: unrecognized option '$1'" >&2 -@@ -151,7 +154,8 @@ - - test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - mv "$VDIR"/dev "$VDIR"/dev.X --"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" || : ## HACK: ignore all errors... -+#this adds the variable $script to the debootstrap call -+"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" "$script" || : ## HACK: ignore all errors... - fixupDebian "$VDIR" - test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-delete.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-delete.patch deleted file mode 100644 index c7b04d9..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-delete.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst 2006-03-25 00:33:26.000000000 +0100 -@@ -18,6 +18,7 @@ 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 - core @PKGLIBDIR@/util-vserver-vars - build @PKGLIBDIR@/rpm-fake.so - legacy @LEGACYDIR@/save_s_context -diff -Nurp util-vserver-0.30.210.orig/Makefile.in util-vserver-0.30.210.delete/Makefile.in ---- util-vserver-0.30.210.orig/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210.delete/Makefile.in 2006-04-06 19:50:42.000000000 +0200 -@@ -1927,7 +1927,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \ -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.delete/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/Makefile-files 2006-03-25 00:31:07.000000000 +0100 -@@ -52,7 +52,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.delete/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/vserver 2006-03-23 23:07:03.000000000 +0100 -@@ -57,6 +57,7 @@ Possible commands are: - - build <buildopts>* - ... builds a new vserver from scratch -+ delete ... remove a vserver - - unify [-R] - ... (de)unify vserver -@@ -199,7 +200,7 @@ test "$2" != start -o -n "$OPTION_NONAME - - . $__PKGLIBDIR/vserver.functions - case "$2" in -- (start|stop) -+ (start|stop|delete) - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.delete util-vserver-0.30.210.delete/scripts/vserver.delete ---- util-vserver-0.30.210.orig/scripts/vserver.delete 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.delete/scripts/vserver.delete 2006-03-25 00:49:35.000000000 +0100 -@@ -0,0 +1,34 @@ -+#! /bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS" -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+if test -z "$OPTION_SILENT" ; then -+ read -p "Are you sure you want to delete the vserver $vserver (y/N) " deleteok -+ if [[ ${deleteok} != [Yy] ]]; then -+ exit 2 -+ fi -+fi -+ -+isVserverRunning "$VSERVER_DIR" && -+ "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ -+base.init -+pkgmgmt.initVariables -+rm -rf "`readlink -f "$VSERVER_DIR"/vdir`" "$VSERVER_DIR" "$PKGCFGDIR" diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-fc5.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-fc5.patch deleted file mode 100644 index 895206c..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-fc5.patch +++ /dev/null @@ -1,403 +0,0 @@ -diff -NurpP util-vserver-0.30.210/distrib/centos42/pkgs/03 util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 ---- util-vserver-0.30.210/distrib/centos42/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 2006-04-13 14:44:32.579223250 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.579223250 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for CentOS 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/centos4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc4/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 ---- util-vserver-0.30.210/distrib/fc4/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities ---- util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities 2006-04-13 14:44:29.159009500 +0200 -@@ -0,0 +1,7 @@ -+Essential: -+ basesystem -+ coreutils -+ filesystem -+ glibc -+ setup -+ fedora-release -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/sources.list util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list ---- util-vserver-0.30.210/distrib/fc5/apt/sources.list 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+# rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates -+ -+# rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates -+# rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates -+# rpm http://download.fedora.us/fedora/fedora 3/i386 os updates -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/01 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 ---- util-vserver-0.30.210/distrib/fc5/pkgs/01 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1 @@ -+glibc -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/02 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 ---- util-vserver-0.30.210/distrib/fc5/pkgs/02 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,3 @@ -+--reinstall -+ -+filesystem -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 ---- util-vserver-0.30.210/distrib/fc5/pkgs/03 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+coreutils -+initscripts -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst ---- util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+basesystem-*.rpm -+filesystem-*.rpm -+glibc-common-*.rpm -+glibc-[0-9]*.rpm -+libgcc-[0-9]*.rpm -+setup-*.rpm -+tzdata-*.rpm -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum/yum.conf util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf ---- util-vserver-0.30.210/distrib/fc5/yum/yum.conf 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,10 @@ -+[main] -+cachedir=@YUMCACHEDIR@ -+reposdir=@YUMETCDIR@/yum.repos.d -+debuglevel=1 -+logfile=@YUMLOGDIR@/log -+lockfile=@YUMLOCKDIR@/yum.pid -+pkgpolicy=newest -+distroverpkg=fedora-release -+installonlypkgs= -+exactarch=0 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,6 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora Core 5 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc5-vps/ -+enabled=1 -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,21 @@ -+[core] -+name=Fedora Core 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/os/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-debuginfo] -+name=Fedora Core 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-source] -+name=Fedora Core 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo 2006-04-13 14:44:29.195011750 +0200 -@@ -0,0 +1,44 @@ -+# These packages are untested and still under development. This -+# repository is used for updates to test releases, and for -+# development of new releases. -+# -+# This repository can see significant daily turnover and major -+# functionality changes which cause unexpected problems with other -+# development packages. Please use these packages if you want to work -+# with the Fedora developers by testing these new development packages. -+# -+# fedora-test-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with new test releases. -+# -+# fedora-devel-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with developing new releases. -+# -+# More information is available at http://fedoraproject.org/wiki/Testing -+# -+# Reproducible and reportable issues should be filed at -+# http://bugzilla.redhat.com/. -+# -+# Product: Fedora Core -+# Version: devel -+ -+[development] -+name=Fedora Core - Development -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide -+enabled=0 -+gpgcheck=0 -+ -+[development-debuginfo] -+name=Fedora Core - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/debug/ -+enabled=0 -+gpgcheck=0 -+ -+[development-source] -+name=Fedora Core - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/ -+enabled=0 -+gpgcheck=0 -+ -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras-development] -+name=Fedora Extras - Development Tree -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-devel -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-debuginfo] -+name=Fedora Extras - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-source] -+name=Fedora Extras - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras] -+name=Fedora Extras 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-5 -+enabled=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-debuginfo] -+name=Fedora Extras 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-source] -+name=Fedora Extras 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,13 @@ -+[legacy-updates] -+name=Fedora Legacy 5 - $basearch - Updates -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-released-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -+ -+[legacy-testing] -+name=Fedora Legacy 5 - $basearch - Updates Testing -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates] -+name=Fedora Core 5 - $basearch - Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-debuginfo] -+name=Fedora Core 5 - $basearch - Updates - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-source] -+name=Fedora Core 5 - Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates-testing] -+name=Fedora Core 5 - $basearch - Test Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-debuginfo] -+name=Fedora Core 5 - $basearch - Test Updates Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-source] -+name=Fedora Core 5 - Test Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -diff -NurpP util-vserver-0.30.210/distrib/Makefile.am util-vserver-0.30.210-fc5/distrib/Makefile.am ---- util-vserver-0.30.210/distrib/Makefile.am 2005-10-28 19:53:49.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.am 2006-04-13 14:44:29.203012250 +0200 -@@ -40,13 +40,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -65,7 +68,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - - install-exec-hook: install-notify-xtra - install-data-hook: install-data-xtras -diff -NurpP util-vserver-0.30.210/distrib/Makefile.in util-vserver-0.30.210-fc5/distrib/Makefile.in ---- util-vserver-0.30.210/distrib/Makefile.in 2006-01-22 20:33:16.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.in 2006-04-13 14:44:29.203012250 +0200 -@@ -275,13 +275,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -297,7 +300,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - all: all-am - - .SUFFIXES: -@@ -444,7 +447,7 @@ CTAGS: - - - distdir: $(DISTFILES) -- $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template -+ $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/fc5/apt $(distdir)/fc5/pkgs $(distdir)/fc5/rpmlist.d $(distdir)/fc5/yum $(distdir)/fc5/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ -diff -NurpP util-vserver-0.30.210/distrib/redhat/initpost util-vserver-0.30.210-fc5/distrib/redhat/initpost ---- util-vserver-0.30.210/distrib/redhat/initpost 2005-10-29 17:58:40.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/redhat/initpost 2006-04-13 14:44:29.203012250 +0200 -@@ -52,7 +52,7 @@ $_VSERVER "$vserver" start --rescue bash - f=/tmp/startwait - trap "rm -f $f" EXIT - mkfifo $f -- ( sleep 10; kill -s 9 -- -1 ) & -+ ( sleep 15; kill -s 9 -- -1 ) & - cat "$f" >/dev/null - kill -s 9 -- -1 - wait -diff -NurpP util-vserver-0.30.210/scripts/vyum-worker util-vserver-0.30.210-fc5/scripts/vyum-worker ---- util-vserver-0.30.210/scripts/vyum-worker 2005-10-31 10:55:59.000000000 +0100 -+++ util-vserver-0.30.210-fc5/scripts/vyum-worker 2006-04-13 14:44:29.203012250 +0200 -@@ -39,8 +39,8 @@ test -z "$_YUM" || { - - yum=${YUM:-yum} - conf=yum.conf --case $(yum --version) in -- (2.[01234]*) -+case $($yum --version|tail -n 1) in -+ (2.[0123456]*) - python -c 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' &>/dev/null || { - warning "\ - You are using a version of yum which is insecure and broken in chroot diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-namespace-cleanup.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-namespace-cleanup.patch deleted file mode 100644 index 84440f8..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-namespace-cleanup.patch +++ /dev/null @@ -1,117 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 12_vnamespace_cleanup.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/doc/configuration.xml trunk/doc/configuration.xml ---- trunk~/doc/configuration.xml 2006-03-20 08:16:46.000000000 -0500 -+++ trunk/doc/configuration.xml 2006-04-05 23:18:43.000000000 -0400 -@@ -37,6 +37,14 @@ - </description> - </boolean> - -+ <boolean id="global-namespace-cleanup" name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup globally. It can be overridden for a single vserver -+by setting the <optionref ref="global-nonamespace-cleanup">nonamespace-cleanup</optionref> flag -+there. -+ </description> -+ </boolean> -+ - <link name="run.rev"> - <description> - Path of the vserver run reverse directory. This directory contains -@@ -344,6 +352,19 @@ - </description> - </boolean> - -+ <boolean id="global-nonamespace-cleanup" name="nonamespace-cleanup"> -+ <description> -+Overrides the global <optionref ref="global-namespace-cleanup">namespace-cleanup</optionref> flag and disables -+namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ -+ <boolean name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ - <hash name="schedule"> - <description> - [experimental; name is subject of possible change] Contains the -diff -urNad trunk~/scripts/functions trunk/scripts/functions ---- trunk~/scripts/functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/functions 2006-04-05 23:18:43.000000000 -0400 -@@ -480,6 +480,18 @@ - -e "$cfgdir"/nonamespace - } - -+function isNamespaceCleanup -+{ -+ local cfgdir -+ -+ $_VSERVER_INFO - FEATURE namespace || return 0 -+ cfgdir=$($_VSERVER_INFO "$1" CFGDIR) || return 0 -+ test -e "$cfgdir"/nonamespace-cleanup && return 0 -+ test -e "$__CONFDIR"/.defaults/namespace-cleanup -o \ -+ -e "$cfgdir"/namespace-cleanup && return 1 -+ return 0 -+} -+ - ## Usage: getAllVservers <var> [<KIND>*] - function getAllVservers - { -diff -urNad trunk~/scripts/vserver.functions trunk/scripts/vserver.functions ---- trunk~/scripts/vserver.functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/vserver.functions 2006-04-05 23:19:01.000000000 -0400 -@@ -743,13 +743,13 @@ - - test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir" - -- test -z "$NAMESPACE_CLEANUP" || isAvoidNamespace "$cfgdir" || \ -- $_VNAMESPACE --cleanup -- - _mountVserverInternal "$cfgdir"/fstab - _mountVserverInternal "$cfgdir"/fstab.local - _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" - -+ isNamespaceCleanup "$cfgdir" || \ -+ _namespaceCleanup -+ - isAvoidNamespace "$cfgdir" || \ - $_SECURE_MOUNT --rbind -n "$vdir" "/" - } -@@ -1099,3 +1099,29 @@ - _saveSingleDiskLimit "$vdir" "$dlimit" - done - } -+ -+function _namespaceCleanup -+{ -+ local root=$(readlink -f "$vdir") -+ local tmp="$root" -+ local list="" -+ while [ "$tmp" ]; do -+ list="$list $tmp" -+ tmp="${tmp%/*}" -+ done -+ local list_umount="" -+ while read dev path opts; do -+ [ "$path" ] || continue -+ for i in $root /dev /proc; do -+ [ "${path#$i}" != "$path" ] && continue 2 -+ done -+ for i in $list /; do -+ [ "$path" = "$i" ] && continue 2 -+ done -+ list_umount="$path $list_umount" -+ done < /proc/mounts -+ for i in $list_umount; do -+ umount $i -+ done -+} -+ diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-start-vservers.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-start-vservers.patch deleted file mode 100644 index 1747577..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-start-vservers.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/start-vservers util-vserver-0.30.210.start-vservers/scripts/start-vservers ---- util-vserver-0.30.210.orig/scripts/start-vservers 2006-01-22 13:07:30.000000000 +0100 -+++ util-vserver-0.30.210.start-vservers/scripts/start-vservers 2006-04-21 12:14:11.000000000 +0200 -@@ -88,6 +88,7 @@ eval set -- "$tmp" - declare -a tmp_vservers=() - declare -r TAB=$(echo -en "\t") - OPTION_MARK= -+OPTION_MARK_ANY=1 - OPTION_PARALLEL=99 - OPTION_DEBUG= - NOOPTION_DEBUG=1 -@@ -104,7 +105,7 @@ while true; do - (--help) showHelp $0 ;; - (--version) showVersion $0 ;; - (-c) CONFDIR=$2; shift;; -- (-m) OPTION_MARK=$2; shift;; -+ (-m) OPTION_MARK=$2; OPTION_MARK_ANY=; shift;; - (-j) OPTION_PARALLEL=$2; shift;; - (--start) OPTION_FLAVOR=start;; - (--stop) OPTION_FLAVOR=stop;; -@@ -129,6 +130,7 @@ while test $i -gt 0; do - let --i - d=$__CONFDIR/${vservers[$i]}/apps/init - f=$d/mark -+ { test -n "$OPTION_MARK_ANY"; } || \ - { test -n "$OPTION_MARK" -a -r "$f" && grep -qx "$OPTION_MARK" "$f"; } || \ - { test -z "$OPTION_MARK" && test ! -e "$f"; } || \ - unset vservers[$i] -@@ -137,7 +139,7 @@ done - makedir=$($_MKTEMPDIR vserver-init.XXXXXX) - okfile=$($_MKTEMP vserver-init.XXXXXX) - passedfile=$($_MKTEMP vserver-init.XXXXXX) --trap "$_RM -rf $makedir $resultfile $passedfile" EXIT -+trap "$_RM -rf $makedir $okfile $passedfile" EXIT - - test_cmd=false - case "$OPTION_FLAVOR" in diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-usage.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-usage.patch deleted file mode 100644 index a63deca..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-usage.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.usage/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.usage/scripts/vserver 2006-04-13 13:44:37.000000000 +0200 -@@ -271,7 +271,7 @@ case "$2" in - fi - ;; - (*) -- echo $"Usage: $0 {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 -+ echo $"Usage: $0 <vserver> {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 - exit 2 - ;; - esac diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-vcontext-uid.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-vcontext-uid.patch deleted file mode 100644 index ae36e0b..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-vcontext-uid.patch +++ /dev/null @@ -1,134 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc 2006-01-21 18:55:36.000000000 +0100 -+++ util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc 2006-04-10 22:47:45.000000000 +0200 -@@ -156,6 +156,12 @@ Esetgroups(size_t size, const gid_t *lis - { - FatalErrnoError(setgroups(size, list)==-1, "setgroups()"); - } -+ -+inline static void -+Einitgroups(const char *user, gid_t group) -+{ -+ FatalErrnoError(initgroups(user, group)==-1, "initgroups()"); -+} - #endif - - inline static WRAPPER_DECL int -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.vcontext-uid/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/scripts/vserver 2006-04-10 22:49:41.000000000 +0200 -@@ -212,15 +212,15 @@ case "$2" in - ;; - (exec) - shift 2 -- suexec root "$@" -+ suexec 0 "$@" - ;; - (chkconfig) - shift 2 -- suexec root chkconfig "$@" -+ suexec 0 chkconfig "$@" - ;; - (enter) - getEnterShell "$VSERVER_DIR" -- suexec root "${ENTER_SHELL[@]}" -+ suexec 0 "${ENTER_SHELL[@]}" - ;; - (running) - isVserverRunning "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210.vcontext-uid/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/src/vcontext.c 2006-04-10 22:49:20.000000000 +0200 -@@ -1,6 +1,6 @@ - // $Id: vcontext.c,v 1.18 2005/04/28 18:08:12 ensc Exp $ --*- c -*-- - --// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - // - // 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 -@@ -33,6 +33,9 @@ - #include <sys/un.h> - #include <assert.h> - #include <signal.h> -+#include <sys/types.h> -+#include <pwd.h> -+#include <grp.h> - - #include <linux/personality.h> - -@@ -104,7 +107,7 @@ struct Arguments { - uint_least32_t personality_type; - int verbosity; - bool do_chroot; -- uid_t uid; -+ char const * uid; - xid_t xid; - char const * sync_sock; - char const * sync_msg; -@@ -159,7 +162,7 @@ showVersion() - WRITE_MSG(1, - "vcontext " VERSION " -- manages the creation of security contexts\n" - "This program is part of " PACKAGE_STRING "\n\n" -- "Copyright (C) 2004 Enrico Scholz\n" -+ "Copyright (C) 2004-2006 Enrico Scholz\n" - VERSION_COPYRIGHT_DISCLAIMER); - exit(0); - } -@@ -275,9 +278,35 @@ doit(struct Arguments const *args, char - if (args->do_migrate && !args->do_migrateself) - Evc_ctx_migrate(xid); - -- if (args->uid!=(uid_t)(-1) && getuid()!=args->uid) { -- Esetuid(args->uid); -- if (getuid()!=args->uid) { -+ if (args->uid != NULL) { -+ uid_t uid = 0; -+ unsigned long tmp; -+ -+ if (!isNumberUnsigned(args->uid, &tmp, false)) { -+#ifdef __dietlibc__ -+ struct passwd *pw; -+ pw = getpwnam(args->uid); -+ if (pw == NULL) { -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Username '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' does not exist\n"); -+ return wrapper_exit_code; -+ } -+ uid = pw->pw_uid; -+ Einitgroups(args->uid, pw->pw_gid); -+ Esetgid(pw->pw_gid); -+#else -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Uid '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' is not a number\n"); -+ return wrapper_exit_code; -+#endif -+ } -+ else -+ uid = (uid_t) tmp; -+ -+ Esetuid((uid_t) uid); -+ if (getuid()!=uid) { - WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Something went wrong while changing the UID\n"); - exit(wrapper_exit_code); - } -@@ -345,7 +374,7 @@ int main (int argc, char *argv[]) - .is_silentexist = false, - .set_namespace = false, - .verbosity = 1, -- .uid = -1, -+ .uid = NULL, - .xid = VC_DYNAMIC_XID, - .personality_type = VC_BAD_PERSONALITY, - .personality_flags = 0, -@@ -369,7 +398,7 @@ int main (int argc, char *argv[]) - case CMD_SILENTEXIST : args.is_silentexist = true; break; - case CMD_SYNCSOCK : args.sync_sock = optarg; break; - case CMD_SYNCMSG : args.sync_msg = optarg; break; -- case CMD_UID : args.uid = atol(optarg); break; -+ case CMD_UID : args.uid = optarg; break; - case CMD_XID : args.xid = Evc_xidopt2xid(optarg,true); break; - case CMD_SILENT : --args.verbosity; break; - case CMD_PERSTYPE : diff --git a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index b04e384..0000000 --- a/util-vserver/patches/0.30.210-r14/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,455 +0,0 @@ -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers.h util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h 2006-04-07 12:12:36.912449000 +0200 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc 2006-04-07 12:12:36.916449000 +0200 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -NurpP util-vserver-0.30.210/scripts/vserver.functions util-vserver-0.30.210-vlogin/scripts/vserver.functions ---- util-vserver-0.30.210/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/scripts/vserver.functions 2006-04-07 12:12:36.944451000 +0200 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -NurpP util-vserver-0.30.210/src/Makefile-files util-vserver-0.30.210-vlogin/src/Makefile-files ---- util-vserver-0.30.210/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/Makefile-files 2006-04-07 12:12:36.952452000 +0200 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -NurpP util-vserver-0.30.210/src/vcontext.c util-vserver-0.30.210-vlogin/src/vcontext.c ---- util-vserver-0.30.210/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210-vlogin/src/vcontext.c 2006-04-07 16:54:41.962816000 +0200 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(int argc, char *argv[], int ind); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -233,7 +239,7 @@ doExternalSync(int fd, char const *msg) - } - - static inline ALWAYSINLINE int --doit(struct Arguments const *args, char *argv[]) -+doit(struct Arguments const *args, int argc, char *argv[]) - { - int p[2][2]; - pid_t pid = initSync(p, args->do_disconnect); -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argc, argv, optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -@@ -408,7 +419,7 @@ int main (int argc, char *argv[]) - else if (optind>=argc) - WRITE_MSG(2, "No command given; use '--help' for more information.\n"); - else -- return doit(&args, argv); -+ return doit(&args, argc, argv); - - return wrapper_exit_code; - } -diff -NurpP util-vserver-0.30.210/src/vlogin.c util-vserver-0.30.210-vlogin/src/vlogin.c ---- util-vserver-0.30.210/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/vlogin.c 2006-04-07 16:55:29.201768250 +0200 -@@ -0,0 +1,281 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <strings.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* convert terminal settings to raw mode */ -+ cfmakeraw(&buf); -+ -+ /* apply raw terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activities */ -+static void -+terminal_copy(int src, int dst) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(src, buf, sizeof(buf)); -+ -+ /* write activity to user */ -+ EwriteAll(dst, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(int argc, char *argv[], int ind) -+{ -+ int slave; -+ pid_t pid; -+ int n, i; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[ind], argv+ind); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[ind], argv+ind); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* set process title for ps */ -+ n = strlen(argv[0]); -+ -+ for (i = 0; i < argc; i++) -+ bzero(argv[i], strlen(argv[i])); -+ -+ strncpy(argv[0], "login", n); -+ -+ /* reset terminal to its original mode */ -+ atexit(terminal_reset); -+ -+ /* we want a redraw */ -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ terminal_copy(STDIN_FILENO, t.fd); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_copy(t.fd, STDOUT_FILENO); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index a528752..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/legacy/vserver util-vserver-0.30.210.nice/scripts/legacy/vserver ---- util-vserver-0.30.210.orig/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/legacy/vserver 2006-04-13 02:34:40.000000000 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.nice/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/vserver.functions 2006-04-13 02:35:35.000000000 +0200 -@@ -98,12 +98,11 @@ function _generateChbindOptions - function _generateNiceCommand - { - local vdir=$1 -- local nice -+ local nice=0 - -- test -r "$vdir/nice" || return 0; -- read nice <"$vdir"/nice -+ test -r "$vdir/nice" && read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 57737fc..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc util-vserver-0.30.210/lib/syscall_setccaps-v13.hc ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2006-03-12 22:01:36.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-12 22:02:23.000000000 +0100 -@@ -25,7 +25,7 @@ vc_set_ccaps_v13(xid_t xid, struct vc_ct - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ k_caps.bcaps = (caps->bcaps & caps->bmask) | ~caps->bmask; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-chcontext.8.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-chcontext.8.patch deleted file mode 100644 index bf09182..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-chcontext.8.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: util-vserver-0.30.210/man/chcontext.8 -=================================================================== ---- util-vserver-0.30.210.orig/man/chcontext.8 -+++ util-vserver-0.30.210/man/chcontext.8 -@@ -1,4 +1,4 @@ --.TH "chcontext" "1" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" -+.TH "chcontext" "8" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" - .SH "NAME" - .LP - chcontext \- chcontext allocates a new security context and executes a command in that context. diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-clone-arch.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-clone-arch.patch deleted file mode 100644 index fbbdb51..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-clone-arch.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib_internal/sys_clone.h util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h ---- util-vserver-0.30.210.orig/lib_internal/sys_clone.h 2005-04-28 20:01:37.000000000 +0200 -+++ util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h 2006-04-10 23:43:29.000000000 +0200 -@@ -19,33 +19,54 @@ - #ifndef H_UTIL_VSERVER_SRC_SYS_CLONE_H - #define H_UTIL_VSERVER_SRC_SYS_CLONE_H - -+#include <unistd.h> - #include "lib/syscall-wrap.h" --#define __NR_sys_clone __NR_clone -+#define __NR__sys_clone __NR_clone - - #ifndef CLONE_NEWNS - # define CLONE_NEWNS 0x00020000 - #endif - --#ifdef ENSC_SYSCALL_TRADITIONAL --#include <unistd.h> -+#ifndef ENSC_SYSCALL_TRADITIONAL -+# include <errno.h> - -+# if defined(__s390__) - inline static UNUSED ALWAYSINLINE --int sys_clone(int flags, void *stack) -+_syscall2(int, _sys_clone, void *, child_stack, int, flags) -+# else -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, int, flags, void *, child_stack) -+# endif -+#endif -+ -+inline static UNUSED ALWAYSINLINE -+int sys_clone(int flags, void *child_stack) - { --#if defined __dietlibc__ -+ int ret; -+#ifdef __sparc__ -+ int parent = getpid(); -+#endif -+#if defined(__dietlibc__) && defined(ENSC_SYSCALL_TRADITIONAL) - extern long int syscall (long int __sysno, ...); - #endif -- -- return syscall(__NR_sys_clone, flags, stack); --} --#else --#include <errno.h> - --inline static UNUSED ALWAYSINLINE --_syscall2(int, sys_clone, int, flags, void *, child_stack) -+#if defined(__s390__) && defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, child_stack, flags); -+#elif defined(__s390__) -+ ret = _sys_clone(child_stack, flags); -+#elif defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, flags, child_stack); -+#else -+ ret = _sys_clone(flags, child_stack); -+#endif -+#ifdef __sparc__ -+ if (ret == parent) -+ ret = 0; - #endif -+ return ret; -+} - --#undef __NR_sys_clone -+#undef __NR__sys_clone - - #define ENSC_HAVE_SYSCLONE 1 - diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-clone.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-clone.patch deleted file mode 100644 index 9bb46be..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-clone.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst 2006-03-16 01:48:57.000000000 +0100 -@@ -7,6 +7,7 @@ build @PKGLIBDIR@/vserver-build.skeleto - build @PKGLIBDIR@/vserver-build.debootstrap - build @PKGLIBDIR@/vserver-build.yum - build @PKGLIBDIR@/vserver-build.rpm -+build @PKGLIBDIR@/vserver-build.clone - build @PKGLIBDIR@/vserver-build.functions - build @PKGLIBDIR@/vserver-build.functions.apt - build @PKGLIBDIR@/vserver-build.functions.rpm -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.clone/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/Makefile-files 2006-03-16 02:08:32.000000000 +0100 -@@ -43,6 +43,7 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver-build.debootstrap \ - scripts/vserver-build.rpm \ - scripts/vserver-build.yum \ -+ scripts/vserver-build.clone \ - scripts/vserver-build.functions \ - scripts/vserver-build.functions.apt \ - scripts/vserver-build.functions.rpm \ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build util-vserver-0.30.210.clone/scripts/vserver-build ---- util-vserver-0.30.210.orig/scripts/vserver-build 2005-07-03 19:45:43.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/vserver-build 2006-03-16 01:48:36.000000000 +0100 -@@ -126,7 +126,7 @@ setup_setDefaults "$VSERVER_NAME" - - case x"$method" in - (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; -- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm) -+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone) - . $__PKGLIBDIR/vserver-build.$method - ;; - (x) panic $"No build-method specified";; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build.clone util-vserver-0.30.210.clone/scripts/vserver-build.clone ---- util-vserver-0.30.210.orig/scripts/vserver-build.clone 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.clone/scripts/vserver-build.clone 2006-03-16 02:08:07.000000000 +0100 -@@ -0,0 +1,60 @@ -+# $Id$ --*- sh -*-- -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+tmp=$(getopt -o '+d:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+DISTRIBUTION=: -+use_pkgmgmt= -+source= -+ -+while true; do -+ case "$1" in -+ -d) DISTRIBUTION=$2; shift;; -+ --debug) set -x;; -+ --pkgmgmt) use_pkgmgmt=1;; -+ --source) source=$2; shift;; -+ --) shift; break ;; -+ *) echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2 -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+test -z "$source" && panic $"vserver-build.clone: --source <vserver> is required!" -+ -+getDistribution '' 1 -+ -+base.init -+test -z "$use_pkgmgmt" || pkgmgmt.initVariables -+ -+base.initFilesystem "$OPTION_FORCE" -+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE" -+ -+setup_writeOption "$VSERVER_NAME" -+setup_writeInitialFstab -+ -+$_CP -a "$__CONFDIR/$source/vdir/." "$VDIR" -+ -+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+test -z "$1" || "$@" -+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+base.setSuccess diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-condrestart.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-condrestart.patch deleted file mode 100644 index cdd8cde..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-condrestart.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.condrestart/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.condrestart/scripts/vserver 2006-04-13 02:10:28.000000000 +0200 -@@ -208,7 +208,7 @@ case "$2" in - $cmd "$@" - ;; - (condrestart) -- test ! isVserverRunning "$VSERVER_DIR" || restart -+ ! isVserverRunning "$VSERVER_DIR" || restart - ;; - (exec) - shift 2 diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-cpuset.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-cpuset.patch deleted file mode 100644 index 9f21a83..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-cpuset.patch +++ /dev/null @@ -1,175 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.cpuset/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.functions 2006-04-13 01:36:34.000000000 +0200 -@@ -690,6 +690,54 @@ function generateOptions - fi - } - -+function addtoCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ local i -+ local configured=0 -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ test -d /dev/cpuset/"$cpuset" || mkdir /dev/cpuset/"$cpuset" || configured=1 -+ for i in cpus mems cpu_exclusive mem_exclusive virtualize; do -+ if test -e "$f"/"$i"; then -+ cat "$f"/"$i" >/dev/cpuset/"$cpuset"/"$i" 2>/dev/null || { -+ configured=1 -+ break -+ } -+ fi -+ done -+ } -+ -+ echo $$ >/dev/cpuset/"$cpuset"/tasks || configured=1 -+ if [ "$configured" -ne 0 ]; then -+ warning $"\ -+WARNING: Failed to create or CPUSET \"$cpuset\" does not exist! Not using it!" >&2 -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ return 0 -+ fi -+} -+ -+function removeCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ } -+} -+ - function _mountVserverInternal - { - local fstab="$1" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-setup.functions util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions ---- util-vserver-0.30.210.orig/scripts/vserver-setup.functions 2006-01-03 00:50:21.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions 2006-04-13 01:39:08.000000000 +0200 -@@ -24,11 +24,15 @@ SETUP_LOCKFILE= - SETUP_CONFDIR= - SETUP_CONTEXT= - SETUP_INITSTYLE= -+SETUP_CPUSET= -+SETUP_CPUSETCPUS= -+SETUP_CPUSETMEMS= -+SETUP_CPUSETVIRT= - - declare -a SETUP_INTERFACES=() - declare -a SETUP_FLAGS=() - --declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:" -+declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:,cpuset:,cpusetcpus:,cpusetmems:,cpusetvirt" - declare -r SETUP_HELPMSG=$" - --context ... the static context of the vserver [default: none; a dynamic - context will be assumed] -@@ -55,6 +59,19 @@ declare -r SETUP_HELPMSG=$" - this becomes a per vserver limit) - private: No other process can join this security context. - Even root -+ --cpuset <name> -+ ... declares the CPUSET this vserver will run in [default: none] -+ --cpusetcpus <number[-number][:<exclusive>]> -+ ... sets which cpus belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those cpus -+ --cpusetmems <number[-number][:<exclusive>]> -+ ... sets which memory pools belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those memory pools -+ --cpusetvirt -+ ... virtualize cpuset (guest will see only CPUs defined in cpuset) -+ Requires kernel patch from http://www.bullopensource.org/cpuset/ - --initstyle <style> - ... configures the initstyle (e.g. minit,sysv,plain) - " -@@ -71,7 +88,23 @@ function setup_setOption2 - (--netprefix) SETUP_NETPREFIX=$2;; - (--netbcast) SETUP_NETBCAST=$2;; - (--interface) SETUP_INTERFACES=( "${SETUP_INTERFACES[@]}" "$2" );; -- (--initstyle) SETUP_INITSTYLE=$2;; -+ (--initstyle) SETUP_INITSTYLE=$2;; -+ (--cpuset) SETUP_CPUSET=$2;; -+ (--cpusetcpus) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETCPUS=$1 -+ SETUP_CPUSETCPUSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetmems) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETMEMS=$1 -+ SETUP_CPUSETMEMSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetvirt) SETUP_CPUSETVIRT=1;; - (--flags) old_IFS=$IFS - IFS=, - set -- $2 -@@ -140,7 +173,7 @@ function setup_writeOption - local cfgdir=${SETUP_CONFDIR:?} - local i - -- mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts -+ mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts "$cfgdir"/cpuset - - _setup_writeSingleOption "$name" "$cfgdir"/name - _setup_writeSingleOption "$SETUP_CONTEXT" "$cfgdir"/context -@@ -150,6 +183,12 @@ function setup_writeOption - _setup_writeSingleOption "$SETUP_NETPREFIX" "$cfgdir"/interfaces/prefix - _setup_writeSingleOption "$SETUP_NETBCAST" "$cfgdir"/interfaces/bcast - _setup_writeSingleOption "$SETUP_INITSTYLE" "$cfgdir"/apps/init/style -+ _setup_writeSingleOption "$SETUP_CPUSET" "$cfgdir"/cpuset/name -+ _setup_writeSingleOption "$SETUP_CPUSETCPUS" "$cfgdir"/cpuset/cpus -+ _setup_writeSingleOption "$SETUP_CPUSETCPUSEXCL" "$cfgdir"/cpuset/cpus_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETMEMS" "$cfgdir"/cpuset/mems -+ _setup_writeSingleOption "$SETUP_CPUSETMEMSEXCL" "$cfgdir"/cpuset/mem_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETVIRT" "$cfgdir"/cpuset/virtualize - - local idx=0 - for i in "${SETUP_INTERFACES[@]}"; do -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.start util-vserver-0.30.210.cpuset/scripts/vserver.start ---- util-vserver-0.30.210.orig/scripts/vserver.start 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.start 2006-04-13 01:36:34.000000000 +0200 -@@ -113,6 +113,7 @@ enableInterfaces "$VSERVER_DIR" && have_ - - mountVserver "$VSERVER_DIR" && is_mounted=1 - prepareInit "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - pushd "$VSERVER_DIR"/vdir/ >/dev/null - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-start -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.stop util-vserver-0.30.210.cpuset/scripts/vserver.stop ---- util-vserver-0.30.210.orig/scripts/vserver.stop 2006-01-21 14:22:23.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.stop 2006-04-13 01:36:34.000000000 +0200 -@@ -101,3 +101,4 @@ disableInterfaces "$VSERVER_DIR" - saveDiskLimits "$VSERVER_DIR" - - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" postpost-stop -+removeCPUSET "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.suexec util-vserver-0.30.210.cpuset/scripts/vserver.suexec ---- util-vserver-0.30.210.orig/scripts/vserver.suexec 2005-07-15 21:01:06.000000000 +0200 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.suexec 2006-04-13 01:36:34.000000000 +0200 -@@ -22,6 +22,7 @@ test -z "$is_stopped" -o "$OPTION_INSECU - exit 1 - } - generateOptions "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - user=$1 - shift diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-debootstrap-script.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-debootstrap-script.patch deleted file mode 100644 index f435c7e..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-debootstrap-script.patch +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 05_vserver-build_dbootstrap_script.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/scripts/vserver-build trunk/scripts/vserver-build ---- trunk~/scripts/vserver-build 2006-03-20 10:28:10.000000000 -0500 -+++ trunk/scripts/vserver-build 2006-03-20 10:31:30.000000000 -0500 -@@ -64,7 +64,7 @@ - skeleton ... -- [<cmd> <args>*] - ... installs a minimal skeleton filesystem, creates the - configuration file and calls an optional command then -- debootstrap ... -- -d <distribution> [-m <mirror>] [-- <debootstrap-options>*] -+ debootstrap ... -- -d <distribution> [-m <mirror>] [-s <script> ] [-- <debootstrap-options>*] - bootstraps the vserver with Debian's 'debootstrap' package - - Please report bugs to $PACKAGE_BUGREPORT" -diff -urNad trunk~/scripts/vserver-build.debootstrap trunk/scripts/vserver-build.debootstrap ---- trunk~/scripts/vserver-build.debootstrap 2006-03-20 10:31:13.000000000 -0500 -+++ trunk/scripts/vserver-build.debootstrap 2006-03-20 10:33:08.000000000 -0500 -@@ -121,7 +121,8 @@ - ### main starts here <--- - - --tmp=$(getopt -o '+d:m:' --long debug -n "$0" -- "$@") || exit 1 -+#Parameter s added for debootstrap use -+tmp=$(getopt -o '+d:m:s:' --long debug -n "$0" -- "$@") || exit 1 - eval set -- "$tmp" - - init -@@ -130,6 +131,8 @@ - case "$1" in - (-d) DISTRIBUTION=$2; shift;; - (-m) mirror=$2; shift;; -+#Parameter s added for debootstrap scripts -+ (-s) script=$2; shift;; - (--debug) set -x;; - (--) shift; break ;; - (*) echo "vserver-build.debootstrap: internal error: unrecognized option '$1'" >&2 -@@ -151,7 +154,8 @@ - - test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - mv "$VDIR"/dev "$VDIR"/dev.X --"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" || : ## HACK: ignore all errors... -+#this adds the variable $script to the debootstrap call -+"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" "$script" || : ## HACK: ignore all errors... - fixupDebian "$VDIR" - test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-delete.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-delete.patch deleted file mode 100644 index c7b04d9..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-delete.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst 2006-03-25 00:33:26.000000000 +0100 -@@ -18,6 +18,7 @@ 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 - core @PKGLIBDIR@/util-vserver-vars - build @PKGLIBDIR@/rpm-fake.so - legacy @LEGACYDIR@/save_s_context -diff -Nurp util-vserver-0.30.210.orig/Makefile.in util-vserver-0.30.210.delete/Makefile.in ---- util-vserver-0.30.210.orig/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210.delete/Makefile.in 2006-04-06 19:50:42.000000000 +0200 -@@ -1927,7 +1927,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \ -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.delete/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/Makefile-files 2006-03-25 00:31:07.000000000 +0100 -@@ -52,7 +52,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.delete/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/vserver 2006-03-23 23:07:03.000000000 +0100 -@@ -57,6 +57,7 @@ Possible commands are: - - build <buildopts>* - ... builds a new vserver from scratch -+ delete ... remove a vserver - - unify [-R] - ... (de)unify vserver -@@ -199,7 +200,7 @@ test "$2" != start -o -n "$OPTION_NONAME - - . $__PKGLIBDIR/vserver.functions - case "$2" in -- (start|stop) -+ (start|stop|delete) - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.delete util-vserver-0.30.210.delete/scripts/vserver.delete ---- util-vserver-0.30.210.orig/scripts/vserver.delete 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.delete/scripts/vserver.delete 2006-03-25 00:49:35.000000000 +0100 -@@ -0,0 +1,34 @@ -+#! /bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS" -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+if test -z "$OPTION_SILENT" ; then -+ read -p "Are you sure you want to delete the vserver $vserver (y/N) " deleteok -+ if [[ ${deleteok} != [Yy] ]]; then -+ exit 2 -+ fi -+fi -+ -+isVserverRunning "$VSERVER_DIR" && -+ "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ -+base.init -+pkgmgmt.initVariables -+rm -rf "`readlink -f "$VSERVER_DIR"/vdir`" "$VSERVER_DIR" "$PKGCFGDIR" diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-fc5.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-fc5.patch deleted file mode 100644 index 895206c..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-fc5.patch +++ /dev/null @@ -1,403 +0,0 @@ -diff -NurpP util-vserver-0.30.210/distrib/centos42/pkgs/03 util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 ---- util-vserver-0.30.210/distrib/centos42/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 2006-04-13 14:44:32.579223250 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.579223250 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for CentOS 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/centos4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc4/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 ---- util-vserver-0.30.210/distrib/fc4/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities ---- util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities 2006-04-13 14:44:29.159009500 +0200 -@@ -0,0 +1,7 @@ -+Essential: -+ basesystem -+ coreutils -+ filesystem -+ glibc -+ setup -+ fedora-release -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/sources.list util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list ---- util-vserver-0.30.210/distrib/fc5/apt/sources.list 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+# rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates -+ -+# rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates -+# rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates -+# rpm http://download.fedora.us/fedora/fedora 3/i386 os updates -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/01 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 ---- util-vserver-0.30.210/distrib/fc5/pkgs/01 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1 @@ -+glibc -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/02 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 ---- util-vserver-0.30.210/distrib/fc5/pkgs/02 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,3 @@ -+--reinstall -+ -+filesystem -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 ---- util-vserver-0.30.210/distrib/fc5/pkgs/03 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+coreutils -+initscripts -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst ---- util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+basesystem-*.rpm -+filesystem-*.rpm -+glibc-common-*.rpm -+glibc-[0-9]*.rpm -+libgcc-[0-9]*.rpm -+setup-*.rpm -+tzdata-*.rpm -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum/yum.conf util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf ---- util-vserver-0.30.210/distrib/fc5/yum/yum.conf 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,10 @@ -+[main] -+cachedir=@YUMCACHEDIR@ -+reposdir=@YUMETCDIR@/yum.repos.d -+debuglevel=1 -+logfile=@YUMLOGDIR@/log -+lockfile=@YUMLOCKDIR@/yum.pid -+pkgpolicy=newest -+distroverpkg=fedora-release -+installonlypkgs= -+exactarch=0 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,6 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora Core 5 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc5-vps/ -+enabled=1 -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,21 @@ -+[core] -+name=Fedora Core 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/os/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-debuginfo] -+name=Fedora Core 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-source] -+name=Fedora Core 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo 2006-04-13 14:44:29.195011750 +0200 -@@ -0,0 +1,44 @@ -+# These packages are untested and still under development. This -+# repository is used for updates to test releases, and for -+# development of new releases. -+# -+# This repository can see significant daily turnover and major -+# functionality changes which cause unexpected problems with other -+# development packages. Please use these packages if you want to work -+# with the Fedora developers by testing these new development packages. -+# -+# fedora-test-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with new test releases. -+# -+# fedora-devel-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with developing new releases. -+# -+# More information is available at http://fedoraproject.org/wiki/Testing -+# -+# Reproducible and reportable issues should be filed at -+# http://bugzilla.redhat.com/. -+# -+# Product: Fedora Core -+# Version: devel -+ -+[development] -+name=Fedora Core - Development -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide -+enabled=0 -+gpgcheck=0 -+ -+[development-debuginfo] -+name=Fedora Core - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/debug/ -+enabled=0 -+gpgcheck=0 -+ -+[development-source] -+name=Fedora Core - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/ -+enabled=0 -+gpgcheck=0 -+ -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras-development] -+name=Fedora Extras - Development Tree -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-devel -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-debuginfo] -+name=Fedora Extras - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-source] -+name=Fedora Extras - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras] -+name=Fedora Extras 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-5 -+enabled=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-debuginfo] -+name=Fedora Extras 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-source] -+name=Fedora Extras 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,13 @@ -+[legacy-updates] -+name=Fedora Legacy 5 - $basearch - Updates -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-released-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -+ -+[legacy-testing] -+name=Fedora Legacy 5 - $basearch - Updates Testing -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates] -+name=Fedora Core 5 - $basearch - Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-debuginfo] -+name=Fedora Core 5 - $basearch - Updates - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-source] -+name=Fedora Core 5 - Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates-testing] -+name=Fedora Core 5 - $basearch - Test Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-debuginfo] -+name=Fedora Core 5 - $basearch - Test Updates Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-source] -+name=Fedora Core 5 - Test Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -diff -NurpP util-vserver-0.30.210/distrib/Makefile.am util-vserver-0.30.210-fc5/distrib/Makefile.am ---- util-vserver-0.30.210/distrib/Makefile.am 2005-10-28 19:53:49.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.am 2006-04-13 14:44:29.203012250 +0200 -@@ -40,13 +40,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -65,7 +68,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - - install-exec-hook: install-notify-xtra - install-data-hook: install-data-xtras -diff -NurpP util-vserver-0.30.210/distrib/Makefile.in util-vserver-0.30.210-fc5/distrib/Makefile.in ---- util-vserver-0.30.210/distrib/Makefile.in 2006-01-22 20:33:16.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.in 2006-04-13 14:44:29.203012250 +0200 -@@ -275,13 +275,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -297,7 +300,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - all: all-am - - .SUFFIXES: -@@ -444,7 +447,7 @@ CTAGS: - - - distdir: $(DISTFILES) -- $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template -+ $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/fc5/apt $(distdir)/fc5/pkgs $(distdir)/fc5/rpmlist.d $(distdir)/fc5/yum $(distdir)/fc5/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ -diff -NurpP util-vserver-0.30.210/distrib/redhat/initpost util-vserver-0.30.210-fc5/distrib/redhat/initpost ---- util-vserver-0.30.210/distrib/redhat/initpost 2005-10-29 17:58:40.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/redhat/initpost 2006-04-13 14:44:29.203012250 +0200 -@@ -52,7 +52,7 @@ $_VSERVER "$vserver" start --rescue bash - f=/tmp/startwait - trap "rm -f $f" EXIT - mkfifo $f -- ( sleep 10; kill -s 9 -- -1 ) & -+ ( sleep 15; kill -s 9 -- -1 ) & - cat "$f" >/dev/null - kill -s 9 -- -1 - wait -diff -NurpP util-vserver-0.30.210/scripts/vyum-worker util-vserver-0.30.210-fc5/scripts/vyum-worker ---- util-vserver-0.30.210/scripts/vyum-worker 2005-10-31 10:55:59.000000000 +0100 -+++ util-vserver-0.30.210-fc5/scripts/vyum-worker 2006-04-13 14:44:29.203012250 +0200 -@@ -39,8 +39,8 @@ test -z "$_YUM" || { - - yum=${YUM:-yum} - conf=yum.conf --case $(yum --version) in -- (2.[01234]*) -+case $($yum --version|tail -n 1) in -+ (2.[0123456]*) - python -c 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' &>/dev/null || { - warning "\ - You are using a version of yum which is insecure and broken in chroot diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-namespace-cleanup.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-namespace-cleanup.patch deleted file mode 100644 index 84440f8..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-namespace-cleanup.patch +++ /dev/null @@ -1,117 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 12_vnamespace_cleanup.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/doc/configuration.xml trunk/doc/configuration.xml ---- trunk~/doc/configuration.xml 2006-03-20 08:16:46.000000000 -0500 -+++ trunk/doc/configuration.xml 2006-04-05 23:18:43.000000000 -0400 -@@ -37,6 +37,14 @@ - </description> - </boolean> - -+ <boolean id="global-namespace-cleanup" name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup globally. It can be overridden for a single vserver -+by setting the <optionref ref="global-nonamespace-cleanup">nonamespace-cleanup</optionref> flag -+there. -+ </description> -+ </boolean> -+ - <link name="run.rev"> - <description> - Path of the vserver run reverse directory. This directory contains -@@ -344,6 +352,19 @@ - </description> - </boolean> - -+ <boolean id="global-nonamespace-cleanup" name="nonamespace-cleanup"> -+ <description> -+Overrides the global <optionref ref="global-namespace-cleanup">namespace-cleanup</optionref> flag and disables -+namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ -+ <boolean name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ - <hash name="schedule"> - <description> - [experimental; name is subject of possible change] Contains the -diff -urNad trunk~/scripts/functions trunk/scripts/functions ---- trunk~/scripts/functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/functions 2006-04-05 23:18:43.000000000 -0400 -@@ -480,6 +480,18 @@ - -e "$cfgdir"/nonamespace - } - -+function isNamespaceCleanup -+{ -+ local cfgdir -+ -+ $_VSERVER_INFO - FEATURE namespace || return 0 -+ cfgdir=$($_VSERVER_INFO "$1" CFGDIR) || return 0 -+ test -e "$cfgdir"/nonamespace-cleanup && return 0 -+ test -e "$__CONFDIR"/.defaults/namespace-cleanup -o \ -+ -e "$cfgdir"/namespace-cleanup && return 1 -+ return 0 -+} -+ - ## Usage: getAllVservers <var> [<KIND>*] - function getAllVservers - { -diff -urNad trunk~/scripts/vserver.functions trunk/scripts/vserver.functions ---- trunk~/scripts/vserver.functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/vserver.functions 2006-04-05 23:19:01.000000000 -0400 -@@ -743,13 +743,13 @@ - - test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir" - -- test -z "$NAMESPACE_CLEANUP" || isAvoidNamespace "$cfgdir" || \ -- $_VNAMESPACE --cleanup -- - _mountVserverInternal "$cfgdir"/fstab - _mountVserverInternal "$cfgdir"/fstab.local - _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" - -+ isNamespaceCleanup "$cfgdir" || \ -+ _namespaceCleanup -+ - isAvoidNamespace "$cfgdir" || \ - $_SECURE_MOUNT --rbind -n "$vdir" "/" - } -@@ -1099,3 +1099,29 @@ - _saveSingleDiskLimit "$vdir" "$dlimit" - done - } -+ -+function _namespaceCleanup -+{ -+ local root=$(readlink -f "$vdir") -+ local tmp="$root" -+ local list="" -+ while [ "$tmp" ]; do -+ list="$list $tmp" -+ tmp="${tmp%/*}" -+ done -+ local list_umount="" -+ while read dev path opts; do -+ [ "$path" ] || continue -+ for i in $root /dev /proc; do -+ [ "${path#$i}" != "$path" ] && continue 2 -+ done -+ for i in $list /; do -+ [ "$path" = "$i" ] && continue 2 -+ done -+ list_umount="$path $list_umount" -+ done < /proc/mounts -+ for i in $list_umount; do -+ umount $i -+ done -+} -+ diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-pkgmgmt-vsomething.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-pkgmgmt-vsomething.patch deleted file mode 100644 index 4103963..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-pkgmgmt-vsomething.patch +++ /dev/null @@ -1,255 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vapt-get util-vserver-0.30.210.pkgmgmt/scripts/vapt-get ---- util-vserver-0.30.210.orig/scripts/vapt-get 2005-03-21 21:03:30.000000000 +0100 -+++ util-vserver-0.30.210.pkgmgmt/scripts/vapt-get 2006-07-02 02:52:46.000000000 +0200 -@@ -1,7 +1,7 @@ - #! /bin/bash --# $Id: vapt-get,v 1.14 2005/01/27 21:24:44 ensc Exp $ -+# $Id$ - --# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - # - # 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 -@@ -31,7 +31,7 @@ function showHelp() - $"Usage: $0 <vserver-name>* [--all] -- <params>+ - - Report bugs to <$PACKAGE_BUGREPORT>." -- exit $1 -+ exit 0 - } - - function showVersion() -@@ -40,60 +40,35 @@ function showVersion() - $"vapt-get $PACKAGE_VERSION -- apt-get for vservers - This program is part of $PACKAGE_STRING - --Copyright (C) 2003 Enrico Scholz -+Copyright (C) 2006 Enrico Scholz - This program is free software; you may redistribute it under the terms of - the GNU General Public License. This program has absolutely no warranty." -- exit $1 -+ exit 0 - } - --is_quiet= --declare -a vservers=() -+tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" - --while test "$#" -ge 1; do -+declare -a send_through vsomething_opts -+ -+while true; do - case "$1" in -- --) shift; break;; -- --help) showHelp 0;; -- --quiet|-q) is_quiet=1 ;; -- --all) -- getAllVservers tmp -- vservers=( "${vservers[@]}" "${tmp[@]}" ) -- ;; -- --version) -- showVersion 0;; -- *) vservers=( "${vservers[@]}" "$1" ) -- esac -- shift -+ (--help) showHelp $0 ;; -+ (--version) showVersion ;; -+ (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; -+ (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; -+ (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; -+ (--) shift; break;; -+ (*) echo $"vapt-get: internal error; arg=='$1'" >&2; exit 1;; -+ esac -+ shift - done - --test "$#" -ge 1 || showHelp 1 >&2 --test "${#vservers[@]}" -ne 1 || is_quiet=1 -+VSOMETHING_TITLE=vapt-get -+VSOMETHING_WORKER=$_VAPT_GET_WORKER -+VSOMETHING_PKGMGMT=1 - --cnt=0 --res=255 --for i in "${vservers[@]}"; do -- cnt=$[ cnt + 1 ] -- -- test -n "$is_quiet" || { -- colorize bold echo -n "vaptget: operating on vserver " -- colorize bold colorize emph echo "$i" -- xtermTitle "vaptget: operating on vserver '$i' [$cnt/${#vservers[@]}]" -- } -- -- if pkgmgmt.isInternal "$i"; then -- $_VSERVER "$i" exec apt-get "$@" -- else -- callInNamespace "$i" \ -- "$_VNAMESPACE" --new -- "$_VAPT_GET_WORKER" "$i" "$@" -- fi -- res=$? -- -- test $res -eq 0 -o -n "$is_quiet" || { -- colorize error echo -n $"vapt-get failed on vserver '$i' with errorcode $res" -- echo -- } -- -- test -n "$is_quiet" || echo --done -+export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT - --test "$cnt" -ge 0 || echo "No vservers specified" >&2 --exit $res -+test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- ) -+exec $_VSOMETHING "${send_through[@]}" apt-get "${vsomething_opts[@]}" "$@" -diff -Nurp util-vserver-0.30.210.orig/scripts/vrpm util-vserver-0.30.210.pkgmgmt/scripts/vrpm ---- util-vserver-0.30.210.orig/scripts/vrpm 2006-06-30 05:23:14.000000000 +0200 -+++ util-vserver-0.30.210.pkgmgmt/scripts/vrpm 2006-07-02 02:52:59.000000000 +0200 -@@ -1,7 +1,7 @@ - #! /bin/bash --# $Id: vrpm,v 1.13 2005/01/27 21:24:44 ensc Exp $ -+# $Id$ - --# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - # - # 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 -@@ -24,14 +24,14 @@ test -e "$UTIL_VSERVER_VARS" || { - . "$UTIL_VSERVER_VARS" - . "$_LIB_FUNCTIONS" - -+ - function showHelp() - { - echo \ --$"Usage: $0 <vserver-name>* [--all] [--quiet|-q] [--help] [--version] [--unify] -- <rpm-params>+ -+$"Usage: $0 <vserver-name>* [--all] -- <params>+ - - Report bugs to <$PACKAGE_BUGREPORT>." -- -- exit $1 -+ exit 0 - } - - function showVersion() -@@ -40,71 +40,35 @@ function showVersion() - $"vrpm $PACKAGE_VERSION -- rpm for vservers - This program is part of $PACKAGE_STRING - --Copyright (C) 2003 Enrico Scholz -+Copyright (C) 2006 Enrico Scholz - This program is free software; you may redistribute it under the terms of - the GNU General Public License. This program has absolutely no warranty." -- -- exit $1 -+ exit 0 - } - --do_unify= --is_quiet= --declare -a vservers=() -+tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" - --while test "$#" -ge 1; do -+declare -a send_through vsomething_opts -+ -+while true; do - case "$1" in -- --quiet|-q) -- is_quiet=1 -- ;; -- --all) -- getAllVservers tmp -- vservers=( "${vservers[@]}" "${tmp[@]}" ) -- ;; -- --unify) -- do_unify=1 -- ;; -- --) -- shift; break;; -- --help) -- showHelp 0;; -- --version) -- showVersion 0;; -- *) vservers=( "${vservers[@]}" "$1" ) -- esac -- shift -+ (--help) showHelp $0 ;; -+ (--version) showVersion ;; -+ (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; -+ (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; -+ (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; -+ (--) shift; break;; -+ (*) echo $"vrpm: internal error; arg=='$1'" >&2; exit 1;; -+ esac -+ shift - done - --test "$#" -ge 1 || showHelp 1 >&2 --test "${#vservers[@]}" -ne 1 || is_quiet=1 -- --cnt=0 --res=255 -+VSOMETHING_TITLE=vrpm -+VSOMETHING_WORKER=$_VRPM_WORKER -+VSOMETHING_PKGMGMT=1 - --for i in "${vservers[@]}"; do -- cnt=$[ cnt + 1 ] -- -- test -n "$is_quiet" || { -- colorize bold echo -n "vrpm: operating on vserver " -- colorize bold colorize emph echo "$i" -- xtermTitle "vrpm: operating on vserver '$i' [$cnt/${#vservers[@]}]" -- } -- -- if pkgmgmt.isInternal "$i"; then -- $_VSERVER "$i" exec rpm "$@" -- else -- callInNamespace "$i" \ -- "$_VNAMESPACE" --new -- "$_VRPM_WORKER" "$i" "$@" -- fi -- res=$? -- -- test $res -eq 0 -o "$is_quiet" || { -- colorize error echo -n $"vrpm failed on vserver '$i' with errorcode $res" -- echo -- } -- -- test -n "$is_quiet" || echo --done -+export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT - --test -z "$do_unify" || echo "unify currently unsupported" >&2 --test "$cnt" -ge 0 || echo "No vservers specified" >&2 --exit $res -+test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- ) -+exec $_VSOMETHING "${send_through[@]}" rpm "${vsomething_opts[@]}" "$@" -diff -Nurp util-vserver-0.30.210.orig/scripts/vsomething util-vserver-0.30.210.pkgmgmt/scripts/vsomething ---- util-vserver-0.30.210.orig/scripts/vsomething 2005-04-24 22:30:55.000000000 +0200 -+++ util-vserver-0.30.210.pkgmgmt/scripts/vsomething 2006-07-06 09:35:59.000000000 +0200 -@@ -23,6 +23,7 @@ test -e "$UTIL_VSERVER_VARS" || { - } - . "$UTIL_VSERVER_VARS" - . "$_LIB_FUNCTIONS" -+. "$__PKGLIBDIR/vserver.functions" - - - function showHelp() -@@ -105,8 +106,11 @@ for i in "${vservers[@]}"; do - if pkgmgmt.isInternal "$i"; then - $_VSERVER "$i" exec "$cmd" "$@" - else -- callInNamespace "$i" \ -- "$_VNAMESPACE" --new -- "$VSOMETHING_WORKER" "$i" "$@" -+ ( _generateChbindOptions "$__CONFDIR/$i" -+ callInNamespace "$i" \ -+ "$_VNAMESPACE" --new -- \ -+ "$_CHBIND" "${CHBIND_OPTS[@]}" -- \ -+ "$VSOMETHING_WORKER" "$i" "$@" ) - fi - else - "$cmd" "$i" "$@" diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-rpm-fake-resolver-badperm.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-rpm-fake-resolver-badperm.patch deleted file mode 100644 index 4bf4f40..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-rpm-fake-resolver-badperm.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/src/rpm-fake-resolver.c -=================================================================== ---- util-vserver-0.30.210.orig/src/rpm-fake-resolver.c -+++ util-vserver-0.30.210/src/rpm-fake-resolver.c -@@ -300,6 +300,10 @@ int main(int argc, char * argv[]) - if (args.chroot) Echroot(args.chroot); - Echdir("/"); - -+ if (access("/", X_OK) == -1) { -+ WRITE_MSG(2, "*** root directory is not accessible for specified uid. rpm-fake-resolver will most likely fail.\n"); -+ } -+ - activateContext(args.ctx, args.in_ctx, args.caps, args.flags); - Esetgroups(0, &args.gid); - Esetgid(args.gid); diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-start-vservers.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-start-vservers.patch deleted file mode 100644 index 1747577..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-start-vservers.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/start-vservers util-vserver-0.30.210.start-vservers/scripts/start-vservers ---- util-vserver-0.30.210.orig/scripts/start-vservers 2006-01-22 13:07:30.000000000 +0100 -+++ util-vserver-0.30.210.start-vservers/scripts/start-vservers 2006-04-21 12:14:11.000000000 +0200 -@@ -88,6 +88,7 @@ eval set -- "$tmp" - declare -a tmp_vservers=() - declare -r TAB=$(echo -en "\t") - OPTION_MARK= -+OPTION_MARK_ANY=1 - OPTION_PARALLEL=99 - OPTION_DEBUG= - NOOPTION_DEBUG=1 -@@ -104,7 +105,7 @@ while true; do - (--help) showHelp $0 ;; - (--version) showVersion $0 ;; - (-c) CONFDIR=$2; shift;; -- (-m) OPTION_MARK=$2; shift;; -+ (-m) OPTION_MARK=$2; OPTION_MARK_ANY=; shift;; - (-j) OPTION_PARALLEL=$2; shift;; - (--start) OPTION_FLAVOR=start;; - (--stop) OPTION_FLAVOR=stop;; -@@ -129,6 +130,7 @@ while test $i -gt 0; do - let --i - d=$__CONFDIR/${vservers[$i]}/apps/init - f=$d/mark -+ { test -n "$OPTION_MARK_ANY"; } || \ - { test -n "$OPTION_MARK" -a -r "$f" && grep -qx "$OPTION_MARK" "$f"; } || \ - { test -z "$OPTION_MARK" && test ! -e "$f"; } || \ - unset vservers[$i] -@@ -137,7 +139,7 @@ done - makedir=$($_MKTEMPDIR vserver-init.XXXXXX) - okfile=$($_MKTEMP vserver-init.XXXXXX) - passedfile=$($_MKTEMP vserver-init.XXXXXX) --trap "$_RM -rf $makedir $resultfile $passedfile" EXIT -+trap "$_RM -rf $makedir $okfile $passedfile" EXIT - - test_cmd=false - case "$OPTION_FLAVOR" in diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-usage.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-usage.patch deleted file mode 100644 index a63deca..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-usage.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.usage/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.usage/scripts/vserver 2006-04-13 13:44:37.000000000 +0200 -@@ -271,7 +271,7 @@ case "$2" in - fi - ;; - (*) -- echo $"Usage: $0 {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 -+ echo $"Usage: $0 <vserver> {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 - exit 2 - ;; - esac diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-vcontext-uid.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-vcontext-uid.patch deleted file mode 100644 index ae36e0b..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-vcontext-uid.patch +++ /dev/null @@ -1,134 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc 2006-01-21 18:55:36.000000000 +0100 -+++ util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc 2006-04-10 22:47:45.000000000 +0200 -@@ -156,6 +156,12 @@ Esetgroups(size_t size, const gid_t *lis - { - FatalErrnoError(setgroups(size, list)==-1, "setgroups()"); - } -+ -+inline static void -+Einitgroups(const char *user, gid_t group) -+{ -+ FatalErrnoError(initgroups(user, group)==-1, "initgroups()"); -+} - #endif - - inline static WRAPPER_DECL int -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.vcontext-uid/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/scripts/vserver 2006-04-10 22:49:41.000000000 +0200 -@@ -212,15 +212,15 @@ case "$2" in - ;; - (exec) - shift 2 -- suexec root "$@" -+ suexec 0 "$@" - ;; - (chkconfig) - shift 2 -- suexec root chkconfig "$@" -+ suexec 0 chkconfig "$@" - ;; - (enter) - getEnterShell "$VSERVER_DIR" -- suexec root "${ENTER_SHELL[@]}" -+ suexec 0 "${ENTER_SHELL[@]}" - ;; - (running) - isVserverRunning "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210.vcontext-uid/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/src/vcontext.c 2006-04-10 22:49:20.000000000 +0200 -@@ -1,6 +1,6 @@ - // $Id: vcontext.c,v 1.18 2005/04/28 18:08:12 ensc Exp $ --*- c -*-- - --// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - // - // 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 -@@ -33,6 +33,9 @@ - #include <sys/un.h> - #include <assert.h> - #include <signal.h> -+#include <sys/types.h> -+#include <pwd.h> -+#include <grp.h> - - #include <linux/personality.h> - -@@ -104,7 +107,7 @@ struct Arguments { - uint_least32_t personality_type; - int verbosity; - bool do_chroot; -- uid_t uid; -+ char const * uid; - xid_t xid; - char const * sync_sock; - char const * sync_msg; -@@ -159,7 +162,7 @@ showVersion() - WRITE_MSG(1, - "vcontext " VERSION " -- manages the creation of security contexts\n" - "This program is part of " PACKAGE_STRING "\n\n" -- "Copyright (C) 2004 Enrico Scholz\n" -+ "Copyright (C) 2004-2006 Enrico Scholz\n" - VERSION_COPYRIGHT_DISCLAIMER); - exit(0); - } -@@ -275,9 +278,35 @@ doit(struct Arguments const *args, char - if (args->do_migrate && !args->do_migrateself) - Evc_ctx_migrate(xid); - -- if (args->uid!=(uid_t)(-1) && getuid()!=args->uid) { -- Esetuid(args->uid); -- if (getuid()!=args->uid) { -+ if (args->uid != NULL) { -+ uid_t uid = 0; -+ unsigned long tmp; -+ -+ if (!isNumberUnsigned(args->uid, &tmp, false)) { -+#ifdef __dietlibc__ -+ struct passwd *pw; -+ pw = getpwnam(args->uid); -+ if (pw == NULL) { -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Username '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' does not exist\n"); -+ return wrapper_exit_code; -+ } -+ uid = pw->pw_uid; -+ Einitgroups(args->uid, pw->pw_gid); -+ Esetgid(pw->pw_gid); -+#else -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Uid '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' is not a number\n"); -+ return wrapper_exit_code; -+#endif -+ } -+ else -+ uid = (uid_t) tmp; -+ -+ Esetuid((uid_t) uid); -+ if (getuid()!=uid) { - WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Something went wrong while changing the UID\n"); - exit(wrapper_exit_code); - } -@@ -345,7 +374,7 @@ int main (int argc, char *argv[]) - .is_silentexist = false, - .set_namespace = false, - .verbosity = 1, -- .uid = -1, -+ .uid = NULL, - .xid = VC_DYNAMIC_XID, - .personality_type = VC_BAD_PERSONALITY, - .personality_flags = 0, -@@ -369,7 +398,7 @@ int main (int argc, char *argv[]) - case CMD_SILENTEXIST : args.is_silentexist = true; break; - case CMD_SYNCSOCK : args.sync_sock = optarg; break; - case CMD_SYNCMSG : args.sync_msg = optarg; break; -- case CMD_UID : args.uid = atol(optarg); break; -+ case CMD_UID : args.uid = optarg; break; - case CMD_XID : args.xid = Evc_xidopt2xid(optarg,true); break; - case CMD_SILENT : --args.verbosity; break; - case CMD_PERSTYPE : diff --git a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index b04e384..0000000 --- a/util-vserver/patches/0.30.210-r15/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,455 +0,0 @@ -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers.h util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h 2006-04-07 12:12:36.912449000 +0200 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc 2006-04-07 12:12:36.916449000 +0200 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -NurpP util-vserver-0.30.210/scripts/vserver.functions util-vserver-0.30.210-vlogin/scripts/vserver.functions ---- util-vserver-0.30.210/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/scripts/vserver.functions 2006-04-07 12:12:36.944451000 +0200 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -NurpP util-vserver-0.30.210/src/Makefile-files util-vserver-0.30.210-vlogin/src/Makefile-files ---- util-vserver-0.30.210/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/Makefile-files 2006-04-07 12:12:36.952452000 +0200 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -NurpP util-vserver-0.30.210/src/vcontext.c util-vserver-0.30.210-vlogin/src/vcontext.c ---- util-vserver-0.30.210/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210-vlogin/src/vcontext.c 2006-04-07 16:54:41.962816000 +0200 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(int argc, char *argv[], int ind); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -233,7 +239,7 @@ doExternalSync(int fd, char const *msg) - } - - static inline ALWAYSINLINE int --doit(struct Arguments const *args, char *argv[]) -+doit(struct Arguments const *args, int argc, char *argv[]) - { - int p[2][2]; - pid_t pid = initSync(p, args->do_disconnect); -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argc, argv, optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -@@ -408,7 +419,7 @@ int main (int argc, char *argv[]) - else if (optind>=argc) - WRITE_MSG(2, "No command given; use '--help' for more information.\n"); - else -- return doit(&args, argv); -+ return doit(&args, argc, argv); - - return wrapper_exit_code; - } -diff -NurpP util-vserver-0.30.210/src/vlogin.c util-vserver-0.30.210-vlogin/src/vlogin.c ---- util-vserver-0.30.210/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/vlogin.c 2006-04-07 16:55:29.201768250 +0200 -@@ -0,0 +1,281 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <strings.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* convert terminal settings to raw mode */ -+ cfmakeraw(&buf); -+ -+ /* apply raw terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activities */ -+static void -+terminal_copy(int src, int dst) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(src, buf, sizeof(buf)); -+ -+ /* write activity to user */ -+ EwriteAll(dst, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(int argc, char *argv[], int ind) -+{ -+ int slave; -+ pid_t pid; -+ int n, i; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[ind], argv+ind); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[ind], argv+ind); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* set process title for ps */ -+ n = strlen(argv[0]); -+ -+ for (i = 0; i < argc; i++) -+ bzero(argv[i], strlen(argv[i])); -+ -+ strncpy(argv[0], "login", n); -+ -+ /* reset terminal to its original mode */ -+ atexit(terminal_reset); -+ -+ /* we want a redraw */ -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ terminal_copy(STDIN_FILENO, t.fd); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_copy(t.fd, STDOUT_FILENO); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index a528752..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/legacy/vserver util-vserver-0.30.210.nice/scripts/legacy/vserver ---- util-vserver-0.30.210.orig/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/legacy/vserver 2006-04-13 02:34:40.000000000 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.nice/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/vserver.functions 2006-04-13 02:35:35.000000000 +0200 -@@ -98,12 +98,11 @@ function _generateChbindOptions - function _generateNiceCommand - { - local vdir=$1 -- local nice -+ local nice=0 - -- test -r "$vdir/nice" || return 0; -- read nice <"$vdir"/nice -+ test -r "$vdir/nice" && read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 57737fc..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc util-vserver-0.30.210/lib/syscall_setccaps-v13.hc ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2006-03-12 22:01:36.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-12 22:02:23.000000000 +0100 -@@ -25,7 +25,7 @@ vc_set_ccaps_v13(xid_t xid, struct vc_ct - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ k_caps.bcaps = (caps->bcaps & caps->bmask) | ~caps->bmask; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-chcontext.8.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-chcontext.8.patch deleted file mode 100644 index bf09182..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-chcontext.8.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: util-vserver-0.30.210/man/chcontext.8 -=================================================================== ---- util-vserver-0.30.210.orig/man/chcontext.8 -+++ util-vserver-0.30.210/man/chcontext.8 -@@ -1,4 +1,4 @@ --.TH "chcontext" "1" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" -+.TH "chcontext" "8" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" - .SH "NAME" - .LP - chcontext \- chcontext allocates a new security context and executes a command in that context. diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-clone-arch.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-clone-arch.patch deleted file mode 100644 index fbbdb51..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-clone-arch.patch +++ /dev/null @@ -1,71 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/lib_internal/sys_clone.h util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h ---- util-vserver-0.30.210.orig/lib_internal/sys_clone.h 2005-04-28 20:01:37.000000000 +0200 -+++ util-vserver-0.30.210.clone-arch/lib_internal/sys_clone.h 2006-04-10 23:43:29.000000000 +0200 -@@ -19,33 +19,54 @@ - #ifndef H_UTIL_VSERVER_SRC_SYS_CLONE_H - #define H_UTIL_VSERVER_SRC_SYS_CLONE_H - -+#include <unistd.h> - #include "lib/syscall-wrap.h" --#define __NR_sys_clone __NR_clone -+#define __NR__sys_clone __NR_clone - - #ifndef CLONE_NEWNS - # define CLONE_NEWNS 0x00020000 - #endif - --#ifdef ENSC_SYSCALL_TRADITIONAL --#include <unistd.h> -+#ifndef ENSC_SYSCALL_TRADITIONAL -+# include <errno.h> - -+# if defined(__s390__) - inline static UNUSED ALWAYSINLINE --int sys_clone(int flags, void *stack) -+_syscall2(int, _sys_clone, void *, child_stack, int, flags) -+# else -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, int, flags, void *, child_stack) -+# endif -+#endif -+ -+inline static UNUSED ALWAYSINLINE -+int sys_clone(int flags, void *child_stack) - { --#if defined __dietlibc__ -+ int ret; -+#ifdef __sparc__ -+ int parent = getpid(); -+#endif -+#if defined(__dietlibc__) && defined(ENSC_SYSCALL_TRADITIONAL) - extern long int syscall (long int __sysno, ...); - #endif -- -- return syscall(__NR_sys_clone, flags, stack); --} --#else --#include <errno.h> - --inline static UNUSED ALWAYSINLINE --_syscall2(int, sys_clone, int, flags, void *, child_stack) -+#if defined(__s390__) && defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, child_stack, flags); -+#elif defined(__s390__) -+ ret = _sys_clone(child_stack, flags); -+#elif defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, flags, child_stack); -+#else -+ ret = _sys_clone(flags, child_stack); -+#endif -+#ifdef __sparc__ -+ if (ret == parent) -+ ret = 0; - #endif -+ return ret; -+} - --#undef __NR_sys_clone -+#undef __NR__sys_clone - - #define ENSC_HAVE_SYSCLONE 1 - diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-clone.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-clone.patch deleted file mode 100644 index 9bb46be..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-clone.patch +++ /dev/null @@ -1,98 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.clone/contrib/manifest.dat.pathsubst 2006-03-16 01:48:57.000000000 +0100 -@@ -7,6 +7,7 @@ build @PKGLIBDIR@/vserver-build.skeleto - build @PKGLIBDIR@/vserver-build.debootstrap - build @PKGLIBDIR@/vserver-build.yum - build @PKGLIBDIR@/vserver-build.rpm -+build @PKGLIBDIR@/vserver-build.clone - build @PKGLIBDIR@/vserver-build.functions - build @PKGLIBDIR@/vserver-build.functions.apt - build @PKGLIBDIR@/vserver-build.functions.rpm -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.clone/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/Makefile-files 2006-03-16 02:08:32.000000000 +0100 -@@ -43,6 +43,7 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver-build.debootstrap \ - scripts/vserver-build.rpm \ - scripts/vserver-build.yum \ -+ scripts/vserver-build.clone \ - scripts/vserver-build.functions \ - scripts/vserver-build.functions.apt \ - scripts/vserver-build.functions.rpm \ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build util-vserver-0.30.210.clone/scripts/vserver-build ---- util-vserver-0.30.210.orig/scripts/vserver-build 2005-07-03 19:45:43.000000000 +0200 -+++ util-vserver-0.30.210.clone/scripts/vserver-build 2006-03-16 01:48:36.000000000 +0100 -@@ -126,7 +126,7 @@ setup_setDefaults "$VSERVER_NAME" - - case x"$method" in - (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; -- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm) -+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone) - . $__PKGLIBDIR/vserver-build.$method - ;; - (x) panic $"No build-method specified";; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-build.clone util-vserver-0.30.210.clone/scripts/vserver-build.clone ---- util-vserver-0.30.210.orig/scripts/vserver-build.clone 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.clone/scripts/vserver-build.clone 2006-03-16 02:08:07.000000000 +0100 -@@ -0,0 +1,60 @@ -+# $Id$ --*- sh -*-- -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+tmp=$(getopt -o '+d:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+DISTRIBUTION=: -+use_pkgmgmt= -+source= -+ -+while true; do -+ case "$1" in -+ -d) DISTRIBUTION=$2; shift;; -+ --debug) set -x;; -+ --pkgmgmt) use_pkgmgmt=1;; -+ --source) source=$2; shift;; -+ --) shift; break ;; -+ *) echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2 -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+test -z "$source" && panic $"vserver-build.clone: --source <vserver> is required!" -+ -+getDistribution '' 1 -+ -+base.init -+test -z "$use_pkgmgmt" || pkgmgmt.initVariables -+ -+base.initFilesystem "$OPTION_FORCE" -+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE" -+ -+setup_writeOption "$VSERVER_NAME" -+setup_writeInitialFstab -+ -+$_CP -a "$__CONFDIR/$source/vdir/." "$VDIR" -+ -+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+test -z "$1" || "$@" -+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+base.setSuccess diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-condrestart.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-condrestart.patch deleted file mode 100644 index cdd8cde..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-condrestart.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.condrestart/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.condrestart/scripts/vserver 2006-04-13 02:10:28.000000000 +0200 -@@ -208,7 +208,7 @@ case "$2" in - $cmd "$@" - ;; - (condrestart) -- test ! isVserverRunning "$VSERVER_DIR" || restart -+ ! isVserverRunning "$VSERVER_DIR" || restart - ;; - (exec) - shift 2 diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-cpuset.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-cpuset.patch deleted file mode 100644 index 9f21a83..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-cpuset.patch +++ /dev/null @@ -1,175 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.cpuset/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.functions 2006-04-13 01:36:34.000000000 +0200 -@@ -690,6 +690,54 @@ function generateOptions - fi - } - -+function addtoCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ local i -+ local configured=0 -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ test -d /dev/cpuset/"$cpuset" || mkdir /dev/cpuset/"$cpuset" || configured=1 -+ for i in cpus mems cpu_exclusive mem_exclusive virtualize; do -+ if test -e "$f"/"$i"; then -+ cat "$f"/"$i" >/dev/cpuset/"$cpuset"/"$i" 2>/dev/null || { -+ configured=1 -+ break -+ } -+ fi -+ done -+ } -+ -+ echo $$ >/dev/cpuset/"$cpuset"/tasks || configured=1 -+ if [ "$configured" -ne 0 ]; then -+ warning $"\ -+WARNING: Failed to create or CPUSET \"$cpuset\" does not exist! Not using it!" >&2 -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ return 0 -+ fi -+} -+ -+function removeCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ } -+} -+ - function _mountVserverInternal - { - local fstab="$1" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver-setup.functions util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions ---- util-vserver-0.30.210.orig/scripts/vserver-setup.functions 2006-01-03 00:50:21.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver-setup.functions 2006-04-13 01:39:08.000000000 +0200 -@@ -24,11 +24,15 @@ SETUP_LOCKFILE= - SETUP_CONFDIR= - SETUP_CONTEXT= - SETUP_INITSTYLE= -+SETUP_CPUSET= -+SETUP_CPUSETCPUS= -+SETUP_CPUSETMEMS= -+SETUP_CPUSETVIRT= - - declare -a SETUP_INTERFACES=() - declare -a SETUP_FLAGS=() - --declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:" -+declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:,cpuset:,cpusetcpus:,cpusetmems:,cpusetvirt" - declare -r SETUP_HELPMSG=$" - --context ... the static context of the vserver [default: none; a dynamic - context will be assumed] -@@ -55,6 +59,19 @@ declare -r SETUP_HELPMSG=$" - this becomes a per vserver limit) - private: No other process can join this security context. - Even root -+ --cpuset <name> -+ ... declares the CPUSET this vserver will run in [default: none] -+ --cpusetcpus <number[-number][:<exclusive>]> -+ ... sets which cpus belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those cpus -+ --cpusetmems <number[-number][:<exclusive>]> -+ ... sets which memory pools belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those memory pools -+ --cpusetvirt -+ ... virtualize cpuset (guest will see only CPUs defined in cpuset) -+ Requires kernel patch from http://www.bullopensource.org/cpuset/ - --initstyle <style> - ... configures the initstyle (e.g. minit,sysv,plain) - " -@@ -71,7 +88,23 @@ function setup_setOption2 - (--netprefix) SETUP_NETPREFIX=$2;; - (--netbcast) SETUP_NETBCAST=$2;; - (--interface) SETUP_INTERFACES=( "${SETUP_INTERFACES[@]}" "$2" );; -- (--initstyle) SETUP_INITSTYLE=$2;; -+ (--initstyle) SETUP_INITSTYLE=$2;; -+ (--cpuset) SETUP_CPUSET=$2;; -+ (--cpusetcpus) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETCPUS=$1 -+ SETUP_CPUSETCPUSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetmems) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETMEMS=$1 -+ SETUP_CPUSETMEMSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetvirt) SETUP_CPUSETVIRT=1;; - (--flags) old_IFS=$IFS - IFS=, - set -- $2 -@@ -140,7 +173,7 @@ function setup_writeOption - local cfgdir=${SETUP_CONFDIR:?} - local i - -- mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts -+ mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts "$cfgdir"/cpuset - - _setup_writeSingleOption "$name" "$cfgdir"/name - _setup_writeSingleOption "$SETUP_CONTEXT" "$cfgdir"/context -@@ -150,6 +183,12 @@ function setup_writeOption - _setup_writeSingleOption "$SETUP_NETPREFIX" "$cfgdir"/interfaces/prefix - _setup_writeSingleOption "$SETUP_NETBCAST" "$cfgdir"/interfaces/bcast - _setup_writeSingleOption "$SETUP_INITSTYLE" "$cfgdir"/apps/init/style -+ _setup_writeSingleOption "$SETUP_CPUSET" "$cfgdir"/cpuset/name -+ _setup_writeSingleOption "$SETUP_CPUSETCPUS" "$cfgdir"/cpuset/cpus -+ _setup_writeSingleOption "$SETUP_CPUSETCPUSEXCL" "$cfgdir"/cpuset/cpus_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETMEMS" "$cfgdir"/cpuset/mems -+ _setup_writeSingleOption "$SETUP_CPUSETMEMSEXCL" "$cfgdir"/cpuset/mem_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETVIRT" "$cfgdir"/cpuset/virtualize - - local idx=0 - for i in "${SETUP_INTERFACES[@]}"; do -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.start util-vserver-0.30.210.cpuset/scripts/vserver.start ---- util-vserver-0.30.210.orig/scripts/vserver.start 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.start 2006-04-13 01:36:34.000000000 +0200 -@@ -113,6 +113,7 @@ enableInterfaces "$VSERVER_DIR" && have_ - - mountVserver "$VSERVER_DIR" && is_mounted=1 - prepareInit "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - pushd "$VSERVER_DIR"/vdir/ >/dev/null - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-start -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.stop util-vserver-0.30.210.cpuset/scripts/vserver.stop ---- util-vserver-0.30.210.orig/scripts/vserver.stop 2006-01-21 14:22:23.000000000 +0100 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.stop 2006-04-13 01:36:34.000000000 +0200 -@@ -101,3 +101,4 @@ disableInterfaces "$VSERVER_DIR" - saveDiskLimits "$VSERVER_DIR" - - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" postpost-stop -+removeCPUSET "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.suexec util-vserver-0.30.210.cpuset/scripts/vserver.suexec ---- util-vserver-0.30.210.orig/scripts/vserver.suexec 2005-07-15 21:01:06.000000000 +0200 -+++ util-vserver-0.30.210.cpuset/scripts/vserver.suexec 2006-04-13 01:36:34.000000000 +0200 -@@ -22,6 +22,7 @@ test -z "$is_stopped" -o "$OPTION_INSECU - exit 1 - } - generateOptions "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - user=$1 - shift diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-debootstrap-script.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-debootstrap-script.patch deleted file mode 100644 index f435c7e..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-debootstrap-script.patch +++ /dev/null @@ -1,51 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 05_vserver-build_dbootstrap_script.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/scripts/vserver-build trunk/scripts/vserver-build ---- trunk~/scripts/vserver-build 2006-03-20 10:28:10.000000000 -0500 -+++ trunk/scripts/vserver-build 2006-03-20 10:31:30.000000000 -0500 -@@ -64,7 +64,7 @@ - skeleton ... -- [<cmd> <args>*] - ... installs a minimal skeleton filesystem, creates the - configuration file and calls an optional command then -- debootstrap ... -- -d <distribution> [-m <mirror>] [-- <debootstrap-options>*] -+ debootstrap ... -- -d <distribution> [-m <mirror>] [-s <script> ] [-- <debootstrap-options>*] - bootstraps the vserver with Debian's 'debootstrap' package - - Please report bugs to $PACKAGE_BUGREPORT" -diff -urNad trunk~/scripts/vserver-build.debootstrap trunk/scripts/vserver-build.debootstrap ---- trunk~/scripts/vserver-build.debootstrap 2006-03-20 10:31:13.000000000 -0500 -+++ trunk/scripts/vserver-build.debootstrap 2006-03-20 10:33:08.000000000 -0500 -@@ -121,7 +121,8 @@ - ### main starts here <--- - - --tmp=$(getopt -o '+d:m:' --long debug -n "$0" -- "$@") || exit 1 -+#Parameter s added for debootstrap use -+tmp=$(getopt -o '+d:m:s:' --long debug -n "$0" -- "$@") || exit 1 - eval set -- "$tmp" - - init -@@ -130,6 +131,8 @@ - case "$1" in - (-d) DISTRIBUTION=$2; shift;; - (-m) mirror=$2; shift;; -+#Parameter s added for debootstrap scripts -+ (-s) script=$2; shift;; - (--debug) set -x;; - (--) shift; break ;; - (*) echo "vserver-build.debootstrap: internal error: unrecognized option '$1'" >&2 -@@ -151,7 +154,8 @@ - - test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - mv "$VDIR"/dev "$VDIR"/dev.X --"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" || : ## HACK: ignore all errors... -+#this adds the variable $script to the debootstrap call -+"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" "$script" || : ## HACK: ignore all errors... - fixupDebian "$VDIR" - test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-delete.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-delete.patch deleted file mode 100644 index c7b04d9..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-delete.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst 2006-01-21 22:34:46.000000000 +0100 -+++ util-vserver-0.30.210.delete/contrib/manifest.dat.pathsubst 2006-03-25 00:33:26.000000000 +0100 -@@ -18,6 +18,7 @@ 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 - core @PKGLIBDIR@/util-vserver-vars - build @PKGLIBDIR@/rpm-fake.so - legacy @LEGACYDIR@/save_s_context -diff -Nurp util-vserver-0.30.210.orig/Makefile.in util-vserver-0.30.210.delete/Makefile.in ---- util-vserver-0.30.210.orig/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210.delete/Makefile.in 2006-04-06 19:50:42.000000000 +0200 -@@ -1927,7 +1927,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - scripts_pkglib_src_SCRPTS = scripts/pkgmgmt \ -diff -Nurp util-vserver-0.30.210.orig/scripts/Makefile-files util-vserver-0.30.210.delete/scripts/Makefile-files ---- util-vserver-0.30.210.orig/scripts/Makefile-files 2005-04-28 19:45:34.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/Makefile-files 2006-03-25 00:31:07.000000000 +0100 -@@ -52,7 +52,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.delete/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.delete/scripts/vserver 2006-03-23 23:07:03.000000000 +0100 -@@ -57,6 +57,7 @@ Possible commands are: - - build <buildopts>* - ... builds a new vserver from scratch -+ delete ... remove a vserver - - unify [-R] - ... (de)unify vserver -@@ -199,7 +200,7 @@ test "$2" != start -o -n "$OPTION_NONAME - - . $__PKGLIBDIR/vserver.functions - case "$2" in -- (start|stop) -+ (start|stop|delete) - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.delete util-vserver-0.30.210.delete/scripts/vserver.delete ---- util-vserver-0.30.210.orig/scripts/vserver.delete 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.delete/scripts/vserver.delete 2006-03-25 00:49:35.000000000 +0100 -@@ -0,0 +1,34 @@ -+#! /bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS" -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+if test -z "$OPTION_SILENT" ; then -+ read -p "Are you sure you want to delete the vserver $vserver (y/N) " deleteok -+ if [[ ${deleteok} != [Yy] ]]; then -+ exit 2 -+ fi -+fi -+ -+isVserverRunning "$VSERVER_DIR" && -+ "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ -+base.init -+pkgmgmt.initVariables -+rm -rf "`readlink -f "$VSERVER_DIR"/vdir`" "$VSERVER_DIR" "$PKGCFGDIR" diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-fc5.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-fc5.patch deleted file mode 100644 index 895206c..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-fc5.patch +++ /dev/null @@ -1,403 +0,0 @@ -diff -NurpP util-vserver-0.30.210/distrib/centos42/pkgs/03 util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 ---- util-vserver-0.30.210/distrib/centos42/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/pkgs/03 2006-04-13 14:44:32.579223250 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/centos42/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.579223250 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for CentOS 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/centos4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc4/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 ---- util-vserver-0.30.210/distrib/fc4/pkgs/03 2005-01-27 15:14:07.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo ---- util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc4/yum.repos.d/cru-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities ---- util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/rpmpriorities 2006-04-13 14:44:29.159009500 +0200 -@@ -0,0 +1,7 @@ -+Essential: -+ basesystem -+ coreutils -+ filesystem -+ glibc -+ setup -+ fedora-release -diff -NurpP util-vserver-0.30.210/distrib/fc5/apt/sources.list util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list ---- util-vserver-0.30.210/distrib/fc5/apt/sources.list 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/apt/sources.list 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+# rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates -+ -+# rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates -+# rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates -+# rpm http://download.fedora.us/fedora/fedora 3/i386 os updates -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/01 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 ---- util-vserver-0.30.210/distrib/fc5/pkgs/01 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/01 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1 @@ -+glibc -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/02 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 ---- util-vserver-0.30.210/distrib/fc5/pkgs/02 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/02 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,3 @@ -+--reinstall -+ -+filesystem -diff -NurpP util-vserver-0.30.210/distrib/fc5/pkgs/03 util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 ---- util-vserver-0.30.210/distrib/fc5/pkgs/03 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/pkgs/03 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,5 @@ -+coreutils -+initscripts -+vps-dev -+vps-fakekernel -+vps-fakepackages -diff -NurpP util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst ---- util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/rpmlist.d/00.lst 2006-04-13 14:44:29.163009750 +0200 -@@ -0,0 +1,7 @@ -+basesystem-*.rpm -+filesystem-*.rpm -+glibc-common-*.rpm -+glibc-[0-9]*.rpm -+libgcc-[0-9]*.rpm -+setup-*.rpm -+tzdata-*.rpm -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum/yum.conf util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf ---- util-vserver-0.30.210/distrib/fc5/yum/yum.conf 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum/yum.conf 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,10 @@ -+[main] -+cachedir=@YUMCACHEDIR@ -+reposdir=@YUMETCDIR@/yum.repos.d -+debuglevel=1 -+logfile=@YUMLOGDIR@/log -+lockfile=@YUMLOCKDIR@/yum.pid -+pkgpolicy=newest -+distroverpkg=fedora-release -+installonlypkgs= -+exactarch=0 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/cru-fc5-vps.repo 2006-04-13 14:44:32.583223500 +0200 -@@ -0,0 +1,6 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora Core 5 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc5-vps/ -+enabled=1 -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-core.repo 2006-04-13 14:44:29.175010500 +0200 -@@ -0,0 +1,21 @@ -+[core] -+name=Fedora Core 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/os/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-debuginfo] -+name=Fedora Core 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-source] -+name=Fedora Core 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-development.repo 2006-04-13 14:44:29.195011750 +0200 -@@ -0,0 +1,44 @@ -+# These packages are untested and still under development. This -+# repository is used for updates to test releases, and for -+# development of new releases. -+# -+# This repository can see significant daily turnover and major -+# functionality changes which cause unexpected problems with other -+# development packages. Please use these packages if you want to work -+# with the Fedora developers by testing these new development packages. -+# -+# fedora-test-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with new test releases. -+# -+# fedora-devel-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with developing new releases. -+# -+# More information is available at http://fedoraproject.org/wiki/Testing -+# -+# Reproducible and reportable issues should be filed at -+# http://bugzilla.redhat.com/. -+# -+# Product: Fedora Core -+# Version: devel -+ -+[development] -+name=Fedora Core - Development -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide -+enabled=0 -+gpgcheck=0 -+ -+[development-debuginfo] -+name=Fedora Core - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/debug/ -+enabled=0 -+gpgcheck=0 -+ -+[development-source] -+name=Fedora Core - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/ -+enabled=0 -+gpgcheck=0 -+ -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras-development.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras-development] -+name=Fedora Extras - Development Tree -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-devel -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-debuginfo] -+name=Fedora Extras - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-source] -+name=Fedora Extras - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-extras.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[extras] -+name=Fedora Extras 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-5 -+enabled=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-debuginfo] -+name=Fedora Extras 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-source] -+name=Fedora Extras 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-legacy.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,13 @@ -+[legacy-updates] -+name=Fedora Legacy 5 - $basearch - Updates -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-released-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -+ -+[legacy-testing] -+name=Fedora Legacy 5 - $basearch - Updates Testing -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates] -+name=Fedora Core 5 - $basearch - Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-debuginfo] -+name=Fedora Core 5 - $basearch - Updates - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-source] -+name=Fedora Core 5 - Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -diff -NurpP util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo ---- util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/fc5/yum.repos.d/fedora-updates-testing.repo 2006-04-13 14:44:29.199012000 +0200 -@@ -0,0 +1,21 @@ -+[updates-testing] -+name=Fedora Core 5 - $basearch - Test Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-debuginfo] -+name=Fedora Core 5 - $basearch - Test Updates Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-source] -+name=Fedora Core 5 - Test Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -diff -NurpP util-vserver-0.30.210/distrib/Makefile.am util-vserver-0.30.210-fc5/distrib/Makefile.am ---- util-vserver-0.30.210/distrib/Makefile.am 2005-10-28 19:53:49.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.am 2006-04-13 14:44:29.203012250 +0200 -@@ -40,13 +40,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -65,7 +68,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - - install-exec-hook: install-notify-xtra - install-data-hook: install-data-xtras -diff -NurpP util-vserver-0.30.210/distrib/Makefile.in util-vserver-0.30.210-fc5/distrib/Makefile.in ---- util-vserver-0.30.210/distrib/Makefile.in 2006-01-22 20:33:16.000000000 +0100 -+++ util-vserver-0.30.210-fc5/distrib/Makefile.in 2006-04-13 14:44:29.203012250 +0200 -@@ -275,13 +275,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -297,7 +300,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - all: all-am - - .SUFFIXES: -@@ -444,7 +447,7 @@ CTAGS: - - - distdir: $(DISTFILES) -- $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template -+ $(mkdir_p) $(distdir)/../m4 $(distdir)/centos42/pkgs $(distdir)/centos42/yum $(distdir)/centos42/yum.repos.d $(distdir)/defaults $(distdir)/defaults/apt $(distdir)/defaults/rpm $(distdir)/fc1/apt $(distdir)/fc1/pkgs $(distdir)/fc2/apt $(distdir)/fc2/pkgs $(distdir)/fc3/apt $(distdir)/fc3/pkgs $(distdir)/fc3/rpmlist.d $(distdir)/fc3/yum $(distdir)/fc3/yum.repos.d $(distdir)/fc4/apt $(distdir)/fc4/pkgs $(distdir)/fc4/rpmlist.d $(distdir)/fc4/yum $(distdir)/fc4/yum.repos.d $(distdir)/fc5/apt $(distdir)/fc5/pkgs $(distdir)/fc5/rpmlist.d $(distdir)/fc5/yum $(distdir)/fc5/yum.repos.d $(distdir)/misc $(distdir)/redhat $(distdir)/rh9/apt $(distdir)/rh9/pkgs $(distdir)/suse91/apt $(distdir)/suse91/pkgs $(distdir)/suse91/rpm $(distdir)/template - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ -diff -NurpP util-vserver-0.30.210/distrib/redhat/initpost util-vserver-0.30.210-fc5/distrib/redhat/initpost ---- util-vserver-0.30.210/distrib/redhat/initpost 2005-10-29 17:58:40.000000000 +0200 -+++ util-vserver-0.30.210-fc5/distrib/redhat/initpost 2006-04-13 14:44:29.203012250 +0200 -@@ -52,7 +52,7 @@ $_VSERVER "$vserver" start --rescue bash - f=/tmp/startwait - trap "rm -f $f" EXIT - mkfifo $f -- ( sleep 10; kill -s 9 -- -1 ) & -+ ( sleep 15; kill -s 9 -- -1 ) & - cat "$f" >/dev/null - kill -s 9 -- -1 - wait -diff -NurpP util-vserver-0.30.210/scripts/vyum-worker util-vserver-0.30.210-fc5/scripts/vyum-worker ---- util-vserver-0.30.210/scripts/vyum-worker 2005-10-31 10:55:59.000000000 +0100 -+++ util-vserver-0.30.210-fc5/scripts/vyum-worker 2006-04-13 14:44:29.203012250 +0200 -@@ -39,8 +39,8 @@ test -z "$_YUM" || { - - yum=${YUM:-yum} - conf=yum.conf --case $(yum --version) in -- (2.[01234]*) -+case $($yum --version|tail -n 1) in -+ (2.[0123456]*) - python -c 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' &>/dev/null || { - warning "\ - You are using a version of yum which is insecure and broken in chroot diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-namespace-cleanup.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-namespace-cleanup.patch deleted file mode 100644 index 84440f8..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-namespace-cleanup.patch +++ /dev/null @@ -1,117 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 12_vnamespace_cleanup.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -diff -urNad trunk~/doc/configuration.xml trunk/doc/configuration.xml ---- trunk~/doc/configuration.xml 2006-03-20 08:16:46.000000000 -0500 -+++ trunk/doc/configuration.xml 2006-04-05 23:18:43.000000000 -0400 -@@ -37,6 +37,14 @@ - </description> - </boolean> - -+ <boolean id="global-namespace-cleanup" name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup globally. It can be overridden for a single vserver -+by setting the <optionref ref="global-nonamespace-cleanup">nonamespace-cleanup</optionref> flag -+there. -+ </description> -+ </boolean> -+ - <link name="run.rev"> - <description> - Path of the vserver run reverse directory. This directory contains -@@ -344,6 +352,19 @@ - </description> - </boolean> - -+ <boolean id="global-nonamespace-cleanup" name="nonamespace-cleanup"> -+ <description> -+Overrides the global <optionref ref="global-namespace-cleanup">namespace-cleanup</optionref> flag and disables -+namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ -+ <boolean name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ - <hash name="schedule"> - <description> - [experimental; name is subject of possible change] Contains the -diff -urNad trunk~/scripts/functions trunk/scripts/functions ---- trunk~/scripts/functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/functions 2006-04-05 23:18:43.000000000 -0400 -@@ -480,6 +480,18 @@ - -e "$cfgdir"/nonamespace - } - -+function isNamespaceCleanup -+{ -+ local cfgdir -+ -+ $_VSERVER_INFO - FEATURE namespace || return 0 -+ cfgdir=$($_VSERVER_INFO "$1" CFGDIR) || return 0 -+ test -e "$cfgdir"/nonamespace-cleanup && return 0 -+ test -e "$__CONFDIR"/.defaults/namespace-cleanup -o \ -+ -e "$cfgdir"/namespace-cleanup && return 1 -+ return 0 -+} -+ - ## Usage: getAllVservers <var> [<KIND>*] - function getAllVservers - { -diff -urNad trunk~/scripts/vserver.functions trunk/scripts/vserver.functions ---- trunk~/scripts/vserver.functions 2006-03-20 08:16:45.000000000 -0500 -+++ trunk/scripts/vserver.functions 2006-04-05 23:19:01.000000000 -0400 -@@ -743,13 +743,13 @@ - - test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir" - -- test -z "$NAMESPACE_CLEANUP" || isAvoidNamespace "$cfgdir" || \ -- $_VNAMESPACE --cleanup -- - _mountVserverInternal "$cfgdir"/fstab - _mountVserverInternal "$cfgdir"/fstab.local - _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" - -+ isNamespaceCleanup "$cfgdir" || \ -+ _namespaceCleanup -+ - isAvoidNamespace "$cfgdir" || \ - $_SECURE_MOUNT --rbind -n "$vdir" "/" - } -@@ -1099,3 +1099,29 @@ - _saveSingleDiskLimit "$vdir" "$dlimit" - done - } -+ -+function _namespaceCleanup -+{ -+ local root=$(readlink -f "$vdir") -+ local tmp="$root" -+ local list="" -+ while [ "$tmp" ]; do -+ list="$list $tmp" -+ tmp="${tmp%/*}" -+ done -+ local list_umount="" -+ while read dev path opts; do -+ [ "$path" ] || continue -+ for i in $root /dev /proc; do -+ [ "${path#$i}" != "$path" ] && continue 2 -+ done -+ for i in $list /; do -+ [ "$path" = "$i" ] && continue 2 -+ done -+ list_umount="$path $list_umount" -+ done < /proc/mounts -+ for i in $list_umount; do -+ umount $i -+ done -+} -+ diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-start-vservers.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-start-vservers.patch deleted file mode 100644 index 1747577..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-start-vservers.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/start-vservers util-vserver-0.30.210.start-vservers/scripts/start-vservers ---- util-vserver-0.30.210.orig/scripts/start-vservers 2006-01-22 13:07:30.000000000 +0100 -+++ util-vserver-0.30.210.start-vservers/scripts/start-vservers 2006-04-21 12:14:11.000000000 +0200 -@@ -88,6 +88,7 @@ eval set -- "$tmp" - declare -a tmp_vservers=() - declare -r TAB=$(echo -en "\t") - OPTION_MARK= -+OPTION_MARK_ANY=1 - OPTION_PARALLEL=99 - OPTION_DEBUG= - NOOPTION_DEBUG=1 -@@ -104,7 +105,7 @@ while true; do - (--help) showHelp $0 ;; - (--version) showVersion $0 ;; - (-c) CONFDIR=$2; shift;; -- (-m) OPTION_MARK=$2; shift;; -+ (-m) OPTION_MARK=$2; OPTION_MARK_ANY=; shift;; - (-j) OPTION_PARALLEL=$2; shift;; - (--start) OPTION_FLAVOR=start;; - (--stop) OPTION_FLAVOR=stop;; -@@ -129,6 +130,7 @@ while test $i -gt 0; do - let --i - d=$__CONFDIR/${vservers[$i]}/apps/init - f=$d/mark -+ { test -n "$OPTION_MARK_ANY"; } || \ - { test -n "$OPTION_MARK" -a -r "$f" && grep -qx "$OPTION_MARK" "$f"; } || \ - { test -z "$OPTION_MARK" && test ! -e "$f"; } || \ - unset vservers[$i] -@@ -137,7 +139,7 @@ done - makedir=$($_MKTEMPDIR vserver-init.XXXXXX) - okfile=$($_MKTEMP vserver-init.XXXXXX) - passedfile=$($_MKTEMP vserver-init.XXXXXX) --trap "$_RM -rf $makedir $resultfile $passedfile" EXIT -+trap "$_RM -rf $makedir $okfile $passedfile" EXIT - - test_cmd=false - case "$OPTION_FLAVOR" in diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-usage.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-usage.patch deleted file mode 100644 index a63deca..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-usage.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.usage/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.usage/scripts/vserver 2006-04-13 13:44:37.000000000 +0200 -@@ -271,7 +271,7 @@ case "$2" in - fi - ;; - (*) -- echo $"Usage: $0 {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 -+ echo $"Usage: $0 <vserver> {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 - exit 2 - ;; - esac diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-vcontext-uid.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-vcontext-uid.patch deleted file mode 100644 index ae36e0b..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-vcontext-uid.patch +++ /dev/null @@ -1,134 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc 2006-01-21 18:55:36.000000000 +0100 -+++ util-vserver-0.30.210.vcontext-uid/ensc_wrappers/wrappers-unistd.hc 2006-04-10 22:47:45.000000000 +0200 -@@ -156,6 +156,12 @@ Esetgroups(size_t size, const gid_t *lis - { - FatalErrnoError(setgroups(size, list)==-1, "setgroups()"); - } -+ -+inline static void -+Einitgroups(const char *user, gid_t group) -+{ -+ FatalErrnoError(initgroups(user, group)==-1, "initgroups()"); -+} - #endif - - inline static WRAPPER_DECL int -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.vcontext-uid/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/scripts/vserver 2006-04-10 22:49:41.000000000 +0200 -@@ -212,15 +212,15 @@ case "$2" in - ;; - (exec) - shift 2 -- suexec root "$@" -+ suexec 0 "$@" - ;; - (chkconfig) - shift 2 -- suexec root chkconfig "$@" -+ suexec 0 chkconfig "$@" - ;; - (enter) - getEnterShell "$VSERVER_DIR" -- suexec root "${ENTER_SHELL[@]}" -+ suexec 0 "${ENTER_SHELL[@]}" - ;; - (running) - isVserverRunning "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210.vcontext-uid/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210.vcontext-uid/src/vcontext.c 2006-04-10 22:49:20.000000000 +0200 -@@ -1,6 +1,6 @@ - // $Id: vcontext.c,v 1.18 2005/04/28 18:08:12 ensc Exp $ --*- c -*-- - --// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - // - // 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 -@@ -33,6 +33,9 @@ - #include <sys/un.h> - #include <assert.h> - #include <signal.h> -+#include <sys/types.h> -+#include <pwd.h> -+#include <grp.h> - - #include <linux/personality.h> - -@@ -104,7 +107,7 @@ struct Arguments { - uint_least32_t personality_type; - int verbosity; - bool do_chroot; -- uid_t uid; -+ char const * uid; - xid_t xid; - char const * sync_sock; - char const * sync_msg; -@@ -159,7 +162,7 @@ showVersion() - WRITE_MSG(1, - "vcontext " VERSION " -- manages the creation of security contexts\n" - "This program is part of " PACKAGE_STRING "\n\n" -- "Copyright (C) 2004 Enrico Scholz\n" -+ "Copyright (C) 2004-2006 Enrico Scholz\n" - VERSION_COPYRIGHT_DISCLAIMER); - exit(0); - } -@@ -275,9 +278,35 @@ doit(struct Arguments const *args, char - if (args->do_migrate && !args->do_migrateself) - Evc_ctx_migrate(xid); - -- if (args->uid!=(uid_t)(-1) && getuid()!=args->uid) { -- Esetuid(args->uid); -- if (getuid()!=args->uid) { -+ if (args->uid != NULL) { -+ uid_t uid = 0; -+ unsigned long tmp; -+ -+ if (!isNumberUnsigned(args->uid, &tmp, false)) { -+#ifdef __dietlibc__ -+ struct passwd *pw; -+ pw = getpwnam(args->uid); -+ if (pw == NULL) { -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Username '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' does not exist\n"); -+ return wrapper_exit_code; -+ } -+ uid = pw->pw_uid; -+ Einitgroups(args->uid, pw->pw_gid); -+ Esetgid(pw->pw_gid); -+#else -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Uid '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' is not a number\n"); -+ return wrapper_exit_code; -+#endif -+ } -+ else -+ uid = (uid_t) tmp; -+ -+ Esetuid((uid_t) uid); -+ if (getuid()!=uid) { - WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Something went wrong while changing the UID\n"); - exit(wrapper_exit_code); - } -@@ -345,7 +374,7 @@ int main (int argc, char *argv[]) - .is_silentexist = false, - .set_namespace = false, - .verbosity = 1, -- .uid = -1, -+ .uid = NULL, - .xid = VC_DYNAMIC_XID, - .personality_type = VC_BAD_PERSONALITY, - .personality_flags = 0, -@@ -369,7 +398,7 @@ int main (int argc, char *argv[]) - case CMD_SILENTEXIST : args.is_silentexist = true; break; - case CMD_SYNCSOCK : args.sync_sock = optarg; break; - case CMD_SYNCMSG : args.sync_msg = optarg; break; -- case CMD_UID : args.uid = atol(optarg); break; -+ case CMD_UID : args.uid = optarg; break; - case CMD_XID : args.xid = Evc_xidopt2xid(optarg,true); break; - case CMD_SILENT : --args.verbosity; break; - case CMD_PERSTYPE : diff --git a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index b04e384..0000000 --- a/util-vserver/patches/0.30.210-r17/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,455 +0,0 @@ -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers.h util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers.h 2006-04-07 12:12:36.912449000 +0200 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -NurpP util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/ensc_wrappers/wrappers-termios.hc 2006-04-07 12:12:36.916449000 +0200 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -NurpP util-vserver-0.30.210/scripts/vserver.functions util-vserver-0.30.210-vlogin/scripts/vserver.functions ---- util-vserver-0.30.210/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/scripts/vserver.functions 2006-04-07 12:12:36.944451000 +0200 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -NurpP util-vserver-0.30.210/src/Makefile-files util-vserver-0.30.210-vlogin/src/Makefile-files ---- util-vserver-0.30.210/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/Makefile-files 2006-04-07 12:12:36.952452000 +0200 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -NurpP util-vserver-0.30.210/src/vcontext.c util-vserver-0.30.210-vlogin/src/vcontext.c ---- util-vserver-0.30.210/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210-vlogin/src/vcontext.c 2006-04-07 16:54:41.962816000 +0200 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(int argc, char *argv[], int ind); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -233,7 +239,7 @@ doExternalSync(int fd, char const *msg) - } - - static inline ALWAYSINLINE int --doit(struct Arguments const *args, char *argv[]) -+doit(struct Arguments const *args, int argc, char *argv[]) - { - int p[2][2]; - pid_t pid = initSync(p, args->do_disconnect); -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argc, argv, optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -@@ -408,7 +419,7 @@ int main (int argc, char *argv[]) - else if (optind>=argc) - WRITE_MSG(2, "No command given; use '--help' for more information.\n"); - else -- return doit(&args, argv); -+ return doit(&args, argc, argv); - - return wrapper_exit_code; - } -diff -NurpP util-vserver-0.30.210/src/vlogin.c util-vserver-0.30.210-vlogin/src/vlogin.c ---- util-vserver-0.30.210/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210-vlogin/src/vlogin.c 2006-04-07 16:55:29.201768250 +0200 -@@ -0,0 +1,281 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <strings.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* convert terminal settings to raw mode */ -+ cfmakeraw(&buf); -+ -+ /* apply raw terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activities */ -+static void -+terminal_copy(int src, int dst) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(src, buf, sizeof(buf)); -+ -+ /* write activity to user */ -+ EwriteAll(dst, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(int argc, char *argv[], int ind) -+{ -+ int slave; -+ pid_t pid; -+ int n, i; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[ind], argv+ind); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[ind], argv+ind); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* set process title for ps */ -+ n = strlen(argv[0]); -+ -+ for (i = 0; i < argc; i++) -+ bzero(argv[i], strlen(argv[i])); -+ -+ strncpy(argv[0], "login", n); -+ -+ /* reset terminal to its original mode */ -+ atexit(terminal_reset); -+ -+ /* we want a redraw */ -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ terminal_copy(STDIN_FILENO, t.fd); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_copy(t.fd, STDOUT_FILENO); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r18/000_README b/util-vserver/patches/0.30.210-r18/000_README deleted file mode 100644 index db8ce55..0000000 --- a/util-vserver/patches/0.30.210-r18/000_README +++ /dev/null @@ -1,114 +0,0 @@ -Numbering scheme --------------------------------------- -FIXES -000_all - 195_all - -FEATURES -200_all - 395_all - -Patch descriptions: --------------------------------------- - -Patch: 000_all_nice.patch -From: Daniel Hokka Zakrisson -Desc: Fix obsolete usage of gnu tools (-1 vs -n 1) - -Patch: 005_all_remove-traditional-syscall.patch -From: Herbert Poetzl -Desc: Fix util-vserver breakage with gcc-3.4.* and -pie - -Patch: 010_all_bmask.patch -From: Daniel Hokka Zakrisson -Desc: vattribute resets bcaps when setting ccaps (upstream patch #4968) - -Patch: 015_all_chcontext-secure.patch -From: Daniel Hokka Zakrisson -Desc: Fix the --secure switch to work as expected - -Patch: 020_all_chcontext.8.patch -From: Micah Anderson -Desc: Change the section for the chcontext man-page (upstream #16083) - -Patch: 025_all_clone-arch.patch -From: Daniel Hokka Zakrisson -Desc: Various arch-specific clone updates (for sparc/sparc64/s390) - -Patch: 030_all_condrestart.patch -From: Daniel Hokka Zakrisson -Desc: Fix the condrestart (upstream #15678) - -Patch: 040_all_debootstrap-script.patch -From: Micah Anderson -Desc: Let the vserver-debootstrap wrapper accept options for custom scripts - -Patch: 045_all_fc5.patch -From: Daniel Hokka Zakrisson -Desc: Adding repos for Fedora Core 5 based/like distributions - -Patch: 050_all_fstab.patch -From: Daniel Hokka Zakrisson -Desc: Implement the opposite of mounting - -Patch: 055_all_remove-init-style-gentoo.patch -From: Christian Heim -Desc: Deprecate init-style gentoo in favour of plain - -Patch: 060_all_start-vservers.patch -From: Daniel Hokka Zakrisson -Desc: Fix the vserver-start all script - -Patch: 065_all_syscall-update.patch -From: Herbert Poetzl -Desc: Updating util-vserver's syscalls - -Patch: 070_all_testsuite-fix.patch -From: Daniel Hokka Zakrisson -Desc: Fix some issues within the testsuite - -Patch: 075_all_usage.patch -From: Andreas John -Desc: Fix the usage hint for the vserver command (upstream #15551) - -Patch: 080_all_vcontext-uid.patch -From: Daniel Hokka Zakrisson -Desc: Better handling of vcontext's --uid option (upstream patch #4966) - -Patch: 200_all_sharedportage.patch -From: Benedikt Boehm -Desc: Adding a example on how to setting up a shared portage dir - -Patch: 205_all_clone.patch -From: Daniel Hokka Zakrisson -Desc: Adding support for guest cloning - -Patch: 215_all_cpuset.patch -From: Jan Rekorajski -Desc: Support for cpuset's - -Patch: 220_all_delete.patch -From: Thomas Champagne and Daniel Hokka Zakrisson -Desc: Adding support for the delete command (upstream patch #4899) - -Patch: 225_all_gentoo-tools.patch -From: Benedikt Boehm and Christian Heim -Desc: Adding various Gentoo related scripts (vemerge, vdispatch-conf, ...) - -Patch: 235_all_namespace-cleanup.patch -From: Bastian Blank and Daniel Hokka Zakrisson -Desc: Adding support for namespace-cleanups (by default) - -Patch: 240_all_pkgmgmt-vsomething.patch -From: Daniel Hokka Zakrisson -Desc: Unifying some distribution specific commands - -Patch: 245_all_template.patch -From: Daniel Hokka Zakrisson -Desc: Create a vserver from a template archive - -Patch: 250_all_vlogin.patch -From: Daniel Hokka Zakrisson / Benedikt Boehm -Desc: Adding support for pts inside vservers (upstream patch #4969) - -Patch: 255_all_shell-completion.patch -From: Thomas Champagne and Ben Voui(?) -Desc: Adding bash/zsh completion scripts diff --git a/util-vserver/patches/0.30.210-r18/000_all_nice.patch b/util-vserver/patches/0.30.210-r18/000_all_nice.patch deleted file mode 100644 index a528752..0000000 --- a/util-vserver/patches/0.30.210-r18/000_all_nice.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/scripts/legacy/vserver util-vserver-0.30.210.nice/scripts/legacy/vserver ---- util-vserver-0.30.210.orig/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/legacy/vserver 2006-04-13 02:34:40.000000000 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.nice/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.nice/scripts/vserver.functions 2006-04-13 02:35:35.000000000 +0200 -@@ -98,12 +98,11 @@ function _generateChbindOptions - function _generateNiceCommand - { - local vdir=$1 -- local nice -+ local nice=0 - -- test -r "$vdir/nice" || return 0; -- read nice <"$vdir"/nice -+ test -r "$vdir/nice" && read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r18/005_all_remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r18/005_all_remove-traditional-syscall.patch deleted file mode 100644 index 70adc44..0000000 --- a/util-vserver/patches/0.30.210-r18/005_all_remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.210/config.h.in -=================================================================== ---- util-vserver-0.30.210.orig/config.h.in -+++ util-vserver-0.30.210/config.h.in -@@ -235,10 +235,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.210/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.210.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.210/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r18/010_all_bmask.patch b/util-vserver/patches/0.30.210-r18/010_all_bmask.patch deleted file mode 100644 index 80b3df4..0000000 --- a/util-vserver/patches/0.30.210-r18/010_all_bmask.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-vserver-0.30.210/lib/syscall_setccaps-v13.hc -=================================================================== ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc -@@ -25,7 +25,7 @@ vc_set_ccaps_v13(xid_t xid, struct vc_ct - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ k_caps.bcaps = (caps->bcaps & caps->bmask) | ~caps->bmask; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r18/015_all_chcontext-secure.patch b/util-vserver/patches/0.30.210-r18/015_all_chcontext-secure.patch deleted file mode 100644 index 78d51f4..0000000 --- a/util-vserver/patches/0.30.210-r18/015_all_chcontext-secure.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: util-vserver-0.30.210/scripts/chcontext -=================================================================== ---- util-vserver-0.30.210.orig/scripts/chcontext -+++ util-vserver-0.30.210/scripts/chcontext -@@ -153,9 +153,9 @@ test -z "$OPT_DOMAINNAME$OPT_HOSTNAME" | - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r18/020_all_chcontext.8.patch b/util-vserver/patches/0.30.210-r18/020_all_chcontext.8.patch deleted file mode 100644 index bf09182..0000000 --- a/util-vserver/patches/0.30.210-r18/020_all_chcontext.8.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: util-vserver-0.30.210/man/chcontext.8 -=================================================================== ---- util-vserver-0.30.210.orig/man/chcontext.8 -+++ util-vserver-0.30.210/man/chcontext.8 -@@ -1,4 +1,4 @@ --.TH "chcontext" "1" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" -+.TH "chcontext" "8" "0.1.0" "Klavs Klavsen <kl@vsen.dk>" "System Administration" - .SH "NAME" - .LP - chcontext \- chcontext allocates a new security context and executes a command in that context. diff --git a/util-vserver/patches/0.30.210-r18/025_all_clone-arch.patch b/util-vserver/patches/0.30.210-r18/025_all_clone-arch.patch deleted file mode 100644 index e35f433..0000000 --- a/util-vserver/patches/0.30.210-r18/025_all_clone-arch.patch +++ /dev/null @@ -1,72 +0,0 @@ -Index: util-vserver-0.30.210/lib_internal/sys_clone.h -=================================================================== ---- util-vserver-0.30.210.orig/lib_internal/sys_clone.h -+++ util-vserver-0.30.210/lib_internal/sys_clone.h -@@ -19,33 +19,54 @@ - #ifndef H_UTIL_VSERVER_SRC_SYS_CLONE_H - #define H_UTIL_VSERVER_SRC_SYS_CLONE_H - -+#include <unistd.h> - #include "lib/syscall-wrap.h" --#define __NR_sys_clone __NR_clone -+#define __NR__sys_clone __NR_clone - - #ifndef CLONE_NEWNS - # define CLONE_NEWNS 0x00020000 - #endif - --#ifdef ENSC_SYSCALL_TRADITIONAL --#include <unistd.h> -+#ifndef ENSC_SYSCALL_TRADITIONAL -+# include <errno.h> - -+# if defined(__s390__) - inline static UNUSED ALWAYSINLINE --int sys_clone(int flags, void *stack) -+_syscall2(int, _sys_clone, void *, child_stack, int, flags) -+# else -+inline static UNUSED ALWAYSINLINE -+_syscall2(int, _sys_clone, int, flags, void *, child_stack) -+# endif -+#endif -+ -+inline static UNUSED ALWAYSINLINE -+int sys_clone(int flags, void *child_stack) - { --#if defined __dietlibc__ -+ int ret; -+#ifdef __sparc__ -+ int parent = getpid(); -+#endif -+#if defined(__dietlibc__) && defined(ENSC_SYSCALL_TRADITIONAL) - extern long int syscall (long int __sysno, ...); - #endif -- -- return syscall(__NR_sys_clone, flags, stack); --} --#else --#include <errno.h> - --inline static UNUSED ALWAYSINLINE --_syscall2(int, sys_clone, int, flags, void *, child_stack) -+#if defined(__s390__) && defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, child_stack, flags); -+#elif defined(__s390__) -+ ret = _sys_clone(child_stack, flags); -+#elif defined(ENSC_SYSCALL_TRADITIONAL) -+ ret = syscall(__NR__sys_clone, flags, child_stack); -+#else -+ ret = _sys_clone(flags, child_stack); -+#endif -+#ifdef __sparc__ -+ if (ret == parent) -+ ret = 0; - #endif -+ return ret; -+} - --#undef __NR_sys_clone -+#undef __NR__sys_clone - - #define ENSC_HAVE_SYSCLONE 1 - diff --git a/util-vserver/patches/0.30.210-r18/030_all_condrestart.patch b/util-vserver/patches/0.30.210-r18/030_all_condrestart.patch deleted file mode 100644 index 19e62c9..0000000 --- a/util-vserver/patches/0.30.210-r18/030_all_condrestart.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver -+++ util-vserver-0.30.210/scripts/vserver -@@ -208,7 +208,7 @@ case "$2" in - $cmd "$@" - ;; - (condrestart) -- test ! isVserverRunning "$VSERVER_DIR" || restart -+ ! isVserverRunning "$VSERVER_DIR" || restart - ;; - (exec) - shift 2 diff --git a/util-vserver/patches/0.30.210-r18/040_all_debootstrap-script.patch b/util-vserver/patches/0.30.210-r18/040_all_debootstrap-script.patch deleted file mode 100644 index 0f69b72..0000000 --- a/util-vserver/patches/0.30.210-r18/040_all_debootstrap-script.patch +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 05_vserver-build_dbootstrap_script.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -Index: util-vserver-0.30.210/scripts/vserver-build -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver-build -+++ util-vserver-0.30.210/scripts/vserver-build -@@ -64,7 +64,7 @@ Possible methods are: - skeleton ... -- [<cmd> <args>*] - ... installs a minimal skeleton filesystem, creates the - configuration file and calls an optional command then -- debootstrap ... -- -d <distribution> [-m <mirror>] [-- <debootstrap-options>*] -+ debootstrap ... -- -d <distribution> [-m <mirror>] [-s <script> ] [-- <debootstrap-options>*] - bootstraps the vserver with Debian's 'debootstrap' package - - Please report bugs to $PACKAGE_BUGREPORT" -Index: util-vserver-0.30.210/scripts/vserver-build.debootstrap -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver-build.debootstrap -+++ util-vserver-0.30.210/scripts/vserver-build.debootstrap -@@ -121,7 +121,8 @@ function fixupDebian - ### main starts here <--- - - --tmp=$(getopt -o '+d:m:' --long debug -n "$0" -- "$@") || exit 1 -+#Parameter s added for debootstrap use -+tmp=$(getopt -o '+d:m:s:' --long debug -n "$0" -- "$@") || exit 1 - eval set -- "$tmp" - - init -@@ -130,6 +131,8 @@ while true; do - case "$1" in - (-d) DISTRIBUTION=$2; shift;; - (-m) mirror=$2; shift;; -+#Parameter s added for debootstrap scripts -+ (-s) script=$2; shift;; - (--debug) set -x;; - (--) shift; break ;; - (*) echo "vserver-build.debootstrap: internal error: unrecognized option '$1'" >&2 -@@ -151,7 +154,8 @@ findDebootstrap - - test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - mv "$VDIR"/dev "$VDIR"/dev.X --"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" || : ## HACK: ignore all errors... -+#this adds the variable $script to the debootstrap call -+"$DEBOOTSTRAP" "$@" "$DISTRIBUTION" "$VDIR" "$mirror" "$script" || : ## HACK: ignore all errors... - fixupDebian "$VDIR" - test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" - diff --git a/util-vserver/patches/0.30.210-r18/045_all_fc5.patch b/util-vserver/patches/0.30.210-r18/045_all_fc5.patch deleted file mode 100644 index 66d8ed2..0000000 --- a/util-vserver/patches/0.30.210-r18/045_all_fc5.patch +++ /dev/null @@ -1,384 +0,0 @@ -Index: util-vserver-0.30.210/distrib/Makefile.am -=================================================================== ---- util-vserver-0.30.210.orig/distrib/Makefile.am -+++ util-vserver-0.30.210/distrib/Makefile.am -@@ -40,13 +40,16 @@ nobase_distrib_DATA = defaults/devs \ - fc1/apt/rpmpriorities fc1/pkgs/01 fc1/pkgs/02 \ - fc2/apt/rpmpriorities fc2/pkgs/01 fc2/pkgs/02 \ - fc3/apt/rpmpriorities fc3/pkgs/01 fc3/pkgs/02 fc3/pkgs/03 \ -- fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/fedora*.repo) \ -+ fc3/yum/yum.conf $(wildcard fc3/yum.repos.d/*.repo) \ - $(wildcard fc3/rpmlist.d/*.lst) $(wildcard fc3/rpmlist.d/*.opt) \ - fc4/apt/rpmpriorities fc4/pkgs/01 fc4/pkgs/02 fc4/pkgs/03 \ -- fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/fedora*.repo) \ -+ fc4/yum/yum.conf $(wildcard fc4/yum.repos.d/*.repo) \ - $(wildcard fc4/rpmlist.d/*.lst) $(wildcard fc4/rpmlist.d/*.opt) \ -+ fc5/apt/rpmpriorities fc5/pkgs/01 fc5/pkgs/02 fc5/pkgs/03 \ -+ fc5/yum/yum.conf $(wildcard fc5/yum.repos.d/*.repo) \ -+ $(wildcard fc5/rpmlist.d/*.lst) $(wildcard fc5/rpmlist.d/*.opt) \ - centos42/pkgs/01 centos42/pkgs/02 centos42/pkgs/03 \ -- centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/CentOS*.repo) \ -+ centos42/yum/yum.conf $(wildcard centos42/yum.repos.d/*.repo) \ - suse91/apt/rpmpriorities suse91/pkgs/01 suse91/pkgs/02 \ - suse91/rpm/macros - -@@ -65,7 +68,7 @@ EXTRA_DIST = $(nobase_distrib_DATA) \ - $(nobase_confdistrib_DATA) \ - $(defaults_DATA) - --redhat_style = rh9 fc1 fc2 fc3 fc4 centos42 -+redhat_style = rh9 fc1 fc2 fc3 fc4 fc5 centos42 - - install-exec-hook: install-notify-xtra - install-data-hook: install-data-xtras -Index: util-vserver-0.30.210/distrib/centos42/pkgs/03 -=================================================================== ---- util-vserver-0.30.210.orig/distrib/centos42/pkgs/03 -+++ util-vserver-0.30.210/distrib/centos42/pkgs/03 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -Index: util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/centos42/yum.repos.d/cru-vps.repo -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for CentOS 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/centos4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -Index: util-vserver-0.30.210/distrib/fc4/pkgs/03 -=================================================================== ---- util-vserver-0.30.210.orig/distrib/fc4/pkgs/03 -+++ util-vserver-0.30.210/distrib/fc4/pkgs/03 -@@ -1,2 +1,5 @@ - coreutils - setup -+vps-dev -+vps-fakekernel -+vps-fakepackages -Index: util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc4/yum.repos.d/cru-vps.repo -@@ -0,0 +1,5 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora 4 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc4-vps/ -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -Index: util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/apt/rpmpriorities -@@ -0,0 +1,7 @@ -+Essential: -+ basesystem -+ coreutils -+ filesystem -+ glibc -+ setup -+ fedora-release -Index: util-vserver-0.30.210/distrib/fc5/apt/sources.list -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/apt/sources.list -@@ -0,0 +1,7 @@ -+# rpm http://ftp.ultra.csn.tu-chemnitz.de/pub/mirror/fedora/core/.apt 3/i386 os patches updates -+ -+# rpm ftp://ftp.ussg.iu.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm ftp://ftp.tu-chemnitz.de/pub/linux/fedora/fedora 3/i386 os updates -+# rpm http://mirrors.usc.edu/pub/linux/fedora/fedora/fedora 3/i386 os updates -+# rpm http://sunsite.informatik.rwth-aachen.de/ftp/pub/Linux/fedora/fedora 3/i386 os updates -+# rpm http://download.fedora.us/fedora/fedora 3/i386 os updates -Index: util-vserver-0.30.210/distrib/fc5/pkgs/01 -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/pkgs/01 -@@ -0,0 +1 @@ -+glibc -Index: util-vserver-0.30.210/distrib/fc5/pkgs/02 -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/pkgs/02 -@@ -0,0 +1,3 @@ -+--reinstall -+ -+filesystem -Index: util-vserver-0.30.210/distrib/fc5/pkgs/03 -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/pkgs/03 -@@ -0,0 +1,5 @@ -+coreutils -+initscripts -+vps-dev -+vps-fakekernel -+vps-fakepackages -Index: util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/rpmlist.d/00.lst -@@ -0,0 +1,7 @@ -+basesystem-*.rpm -+filesystem-*.rpm -+glibc-common-*.rpm -+glibc-[0-9]*.rpm -+libgcc-[0-9]*.rpm -+setup-*.rpm -+tzdata-*.rpm -Index: util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/yum.repos.d/cru-fc5-vps.repo -@@ -0,0 +1,6 @@ -+[cru-vps] -+name=Cru APT Repository for Fedora Core 5 vservers -+baseurl=http://mirror.naturidentisch.de/yum/fc5-vps/ -+enabled=1 -+gpgcheck=1 -+gpgkey=http://naturidentisch.de/packages/cru.asc -Index: util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-core.repo -@@ -0,0 +1,21 @@ -+[core] -+name=Fedora Core 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/os/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-debuginfo] -+name=Fedora Core 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -+ -+[core-source] -+name=Fedora Core 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/5/source/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY -Index: util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-development.repo -@@ -0,0 +1,44 @@ -+# These packages are untested and still under development. This -+# repository is used for updates to test releases, and for -+# development of new releases. -+# -+# This repository can see significant daily turnover and major -+# functionality changes which cause unexpected problems with other -+# development packages. Please use these packages if you want to work -+# with the Fedora developers by testing these new development packages. -+# -+# fedora-test-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with new test releases. -+# -+# fedora-devel-list@redhat.com is available as a discussion forum for -+# testing and troubleshooting for development packages in conjunction -+# with developing new releases. -+# -+# More information is available at http://fedoraproject.org/wiki/Testing -+# -+# Reproducible and reportable issues should be filed at -+# http://bugzilla.redhat.com/. -+# -+# Product: Fedora Core -+# Version: devel -+ -+[development] -+name=Fedora Core - Development -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-rawhide -+enabled=0 -+gpgcheck=0 -+ -+[development-debuginfo] -+name=Fedora Core - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/$basearch/debug/ -+enabled=0 -+gpgcheck=0 -+ -+[development-source] -+name=Fedora Core - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/ -+enabled=0 -+gpgcheck=0 -+ -Index: util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras-development.repo -@@ -0,0 +1,21 @@ -+[extras-development] -+name=Fedora Extras - Development Tree -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-devel -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-debuginfo] -+name=Fedora Extras - Development - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-development-source] -+name=Fedora Extras - Development - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/development/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -Index: util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-extras.repo -@@ -0,0 +1,21 @@ -+[extras] -+name=Fedora Extras 5 - $basearch -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-extras-5 -+enabled=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-debuginfo] -+name=Fedora Extras 5 - $basearch - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/$basearch/debug/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -+ -+[extras-source] -+name=Fedora Extras 5 - Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/5/SRPMS/ -+enabled=0 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras -+gpgcheck=1 -Index: util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-legacy.repo -@@ -0,0 +1,13 @@ -+[legacy-updates] -+name=Fedora Legacy 5 - $basearch - Updates -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-released-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -+ -+[legacy-testing] -+name=Fedora Legacy 5 - $basearch - Updates Testing -+mirrorlist=http://fedora.redhat.com/download/mirrors/legacy-updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-legacy -Index: util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates-testing.repo -@@ -0,0 +1,21 @@ -+[updates-testing] -+name=Fedora Core 5 - $basearch - Test Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-testing-fc5 -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-debuginfo] -+name=Fedora Core 5 - $basearch - Test Updates Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -+ -+[updates-testing-source] -+name=Fedora Core 5 - Test Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/testing/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-test -Index: util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/yum.repos.d/fedora-updates.repo -@@ -0,0 +1,21 @@ -+[updates] -+name=Fedora Core 5 - $basearch - Updates -+#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/ -+mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc5 -+enabled=1 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-debuginfo] -+name=Fedora Core 5 - $basearch - Updates - Debug -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/$basearch/debug/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -+ -+[updates-source] -+name=Fedora Core 5 - Updates Source -+baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/5/SRPMS/ -+enabled=0 -+gpgcheck=1 -+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora -Index: util-vserver-0.30.210/distrib/fc5/yum/yum.conf -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/distrib/fc5/yum/yum.conf -@@ -0,0 +1,10 @@ -+[main] -+cachedir=@YUMCACHEDIR@ -+reposdir=@YUMETCDIR@/yum.repos.d -+debuglevel=1 -+logfile=@YUMLOGDIR@/log -+lockfile=@YUMLOCKDIR@/yum.pid -+pkgpolicy=newest -+distroverpkg=fedora-release -+installonlypkgs= -+exactarch=0 -Index: util-vserver-0.30.210/distrib/redhat/initpost -=================================================================== ---- util-vserver-0.30.210.orig/distrib/redhat/initpost -+++ util-vserver-0.30.210/distrib/redhat/initpost -@@ -52,7 +52,7 @@ $_VSERVER "$vserver" start --rescue bash - f=/tmp/startwait - trap "rm -f $f" EXIT - mkfifo $f -- ( sleep 10; kill -s 9 -- -1 ) & -+ ( sleep 15; kill -s 9 -- -1 ) & - cat "$f" >/dev/null - kill -s 9 -- -1 - wait -Index: util-vserver-0.30.210/scripts/vyum-worker -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vyum-worker -+++ util-vserver-0.30.210/scripts/vyum-worker -@@ -39,8 +39,8 @@ test -z "$_YUM" || { - - yum=${YUM:-yum} - conf=yum.conf --case $(yum --version) in -- (2.[01234]*) -+case $($yum --version|tail -n 1) in -+ (2.[0123456]*) - python -c 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' &>/dev/null || { - warning "\ - You are using a version of yum which is insecure and broken in chroot diff --git a/util-vserver/patches/0.30.210-r18/050_all_fstab.patch b/util-vserver/patches/0.30.210-r18/050_all_fstab.patch deleted file mode 100644 index 4de3c44..0000000 --- a/util-vserver/patches/0.30.210-r18/050_all_fstab.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -782,12 +782,14 @@ function umountVserver - - isAvoidNamespace "$cfgdir" || return 0 - test -e "$cfgdir"/fstab -o \ -- -e "$cfgdir"/fstab.local || return 0 -+ -e "$cfgdir"/fstab.local -o \ -+ -e "$cfgdir"/fstab.remote || return 0 - test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir" - - pushd "$vdir/" >/dev/null || return 1 -- _umountVserverInternal "$cfgdir"/fstab.local || is_ok= -- _umountVserverInternal "$cfgdir"/fstab $_CHBIND "${CHBIND_OPTS[@]}" || is_ok= -+ _umountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" || is_ok= -+ _umountVserverInternal "$cfgdir"/fstab.local || is_ok= -+ _umountVserverInternal "$cfgdir"/fstab || is_ok= - popd >/dev/null || return 1 - - test -n "$is_ok" diff --git a/util-vserver/patches/0.30.210-r18/055_all_remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r18/055_all_remove-init-style-gentoo.patch deleted file mode 100644 index 0b44657..0000000 --- a/util-vserver/patches/0.30.210-r18/055_all_remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -291,9 +291,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r18/060_all_start-vservers.patch b/util-vserver/patches/0.30.210-r18/060_all_start-vservers.patch deleted file mode 100644 index a2251e6..0000000 --- a/util-vserver/patches/0.30.210-r18/060_all_start-vservers.patch +++ /dev/null @@ -1,38 +0,0 @@ -Index: util-vserver-0.30.210/scripts/start-vservers -=================================================================== ---- util-vserver-0.30.210.orig/scripts/start-vservers -+++ util-vserver-0.30.210/scripts/start-vservers -@@ -88,6 +88,7 @@ eval set -- "$tmp" - declare -a tmp_vservers=() - declare -r TAB=$(echo -en "\t") - OPTION_MARK= -+OPTION_MARK_ANY=1 - OPTION_PARALLEL=99 - OPTION_DEBUG= - NOOPTION_DEBUG=1 -@@ -104,7 +105,7 @@ while true; do - (--help) showHelp $0 ;; - (--version) showVersion $0 ;; - (-c) CONFDIR=$2; shift;; -- (-m) OPTION_MARK=$2; shift;; -+ (-m) OPTION_MARK=$2; OPTION_MARK_ANY=; shift;; - (-j) OPTION_PARALLEL=$2; shift;; - (--start) OPTION_FLAVOR=start;; - (--stop) OPTION_FLAVOR=stop;; -@@ -129,6 +130,7 @@ while test $i -gt 0; do - let --i - d=$__CONFDIR/${vservers[$i]}/apps/init - f=$d/mark -+ { test -n "$OPTION_MARK_ANY"; } || \ - { test -n "$OPTION_MARK" -a -r "$f" && grep -qx "$OPTION_MARK" "$f"; } || \ - { test -z "$OPTION_MARK" && test ! -e "$f"; } || \ - unset vservers[$i] -@@ -137,7 +139,7 @@ done - makedir=$($_MKTEMPDIR vserver-init.XXXXXX) - okfile=$($_MKTEMP vserver-init.XXXXXX) - passedfile=$($_MKTEMP vserver-init.XXXXXX) --trap "$_RM -rf $makedir $resultfile $passedfile" EXIT -+trap "$_RM -rf $makedir $okfile $passedfile" EXIT - - test_cmd=false - case "$OPTION_FLAVOR" in diff --git a/util-vserver/patches/0.30.210-r18/065_all_syscall-update.patch b/util-vserver/patches/0.30.210-r18/065_all_syscall-update.patch deleted file mode 100644 index be17208..0000000 --- a/util-vserver/patches/0.30.210-r18/065_all_syscall-update.patch +++ /dev/null @@ -1,245 +0,0 @@ -Index: util-vserver-0.30.210/lib/syscall-alternative.h -=================================================================== ---- util-vserver-0.30.210.orig/lib/syscall-alternative.h -+++ util-vserver-0.30.210/lib/syscall-alternative.h -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r18/070_all_testsuite-fix.patch b/util-vserver/patches/0.30.210-r18/070_all_testsuite-fix.patch deleted file mode 100644 index 0cdc2e4..0000000 --- a/util-vserver/patches/0.30.210-r18/070_all_testsuite-fix.patch +++ /dev/null @@ -1,54 +0,0 @@ -Index: util-vserver-0.30.210/lib/testsuite/personality.c -=================================================================== ---- util-vserver-0.30.210.orig/lib/testsuite/personality.c -+++ util-vserver-0.30.210/lib/testsuite/personality.c -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -Index: util-vserver-0.30.210/src/testsuite/vunify-test.sh -=================================================================== ---- util-vserver-0.30.210.orig/src/testsuite/vunify-test.sh -+++ util-vserver-0.30.210/src/testsuite/vunify-test.sh -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r18/075_all_usage.patch b/util-vserver/patches/0.30.210-r18/075_all_usage.patch deleted file mode 100644 index 74db215..0000000 --- a/util-vserver/patches/0.30.210-r18/075_all_usage.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver -+++ util-vserver-0.30.210/scripts/vserver -@@ -271,7 +271,7 @@ case "$2" in - fi - ;; - (*) -- echo $"Usage: $0 {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 -+ echo $"Usage: $0 <vserver> {start|stop|suexec|restart|condrestart|exec|enter|chkconfig|running|status}" >&2 - exit 2 - ;; - esac diff --git a/util-vserver/patches/0.30.210-r18/080_all_vcontext-uid.patch b/util-vserver/patches/0.30.210-r18/080_all_vcontext-uid.patch deleted file mode 100644 index 5b694f8..0000000 --- a/util-vserver/patches/0.30.210-r18/080_all_vcontext-uid.patch +++ /dev/null @@ -1,137 +0,0 @@ -Index: util-vserver-0.30.210/ensc_wrappers/wrappers-unistd.hc -=================================================================== ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc -+++ util-vserver-0.30.210/ensc_wrappers/wrappers-unistd.hc -@@ -156,6 +156,12 @@ Esetgroups(size_t size, const gid_t *lis - { - FatalErrnoError(setgroups(size, list)==-1, "setgroups()"); - } -+ -+inline static void -+Einitgroups(const char *user, gid_t group) -+{ -+ FatalErrnoError(initgroups(user, group)==-1, "initgroups()"); -+} - #endif - - inline static WRAPPER_DECL int -Index: util-vserver-0.30.210/scripts/vserver -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver -+++ util-vserver-0.30.210/scripts/vserver -@@ -212,15 +212,15 @@ case "$2" in - ;; - (exec) - shift 2 -- suexec root "$@" -+ suexec 0 "$@" - ;; - (chkconfig) - shift 2 -- suexec root chkconfig "$@" -+ suexec 0 chkconfig "$@" - ;; - (enter) - getEnterShell "$VSERVER_DIR" -- suexec root "${ENTER_SHELL[@]}" -+ suexec 0 "${ENTER_SHELL[@]}" - ;; - (running) - isVserverRunning "$VSERVER_DIR" -Index: util-vserver-0.30.210/src/vcontext.c -=================================================================== ---- util-vserver-0.30.210.orig/src/vcontext.c -+++ util-vserver-0.30.210/src/vcontext.c -@@ -1,6 +1,6 @@ - // $Id: vcontext.c,v 1.18 2005/04/28 18:08:12 ensc Exp $ --*- c -*-- - --// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - // - // 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 -@@ -33,6 +33,9 @@ - #include <sys/un.h> - #include <assert.h> - #include <signal.h> -+#include <sys/types.h> -+#include <pwd.h> -+#include <grp.h> - - #include <linux/personality.h> - -@@ -104,7 +107,7 @@ struct Arguments { - uint_least32_t personality_type; - int verbosity; - bool do_chroot; -- uid_t uid; -+ char const * uid; - xid_t xid; - char const * sync_sock; - char const * sync_msg; -@@ -159,7 +162,7 @@ showVersion() - WRITE_MSG(1, - "vcontext " VERSION " -- manages the creation of security contexts\n" - "This program is part of " PACKAGE_STRING "\n\n" -- "Copyright (C) 2004 Enrico Scholz\n" -+ "Copyright (C) 2004-2006 Enrico Scholz\n" - VERSION_COPYRIGHT_DISCLAIMER); - exit(0); - } -@@ -275,9 +278,35 @@ doit(struct Arguments const *args, char - if (args->do_migrate && !args->do_migrateself) - Evc_ctx_migrate(xid); - -- if (args->uid!=(uid_t)(-1) && getuid()!=args->uid) { -- Esetuid(args->uid); -- if (getuid()!=args->uid) { -+ if (args->uid != NULL) { -+ uid_t uid = 0; -+ unsigned long tmp; -+ -+ if (!isNumberUnsigned(args->uid, &tmp, false)) { -+#ifdef __dietlibc__ -+ struct passwd *pw; -+ pw = getpwnam(args->uid); -+ if (pw == NULL) { -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Username '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' does not exist\n"); -+ return wrapper_exit_code; -+ } -+ uid = pw->pw_uid; -+ Einitgroups(args->uid, pw->pw_gid); -+ Esetgid(pw->pw_gid); -+#else -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Uid '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' is not a number\n"); -+ return wrapper_exit_code; -+#endif -+ } -+ else -+ uid = (uid_t) tmp; -+ -+ Esetuid((uid_t) uid); -+ if (getuid()!=uid) { - WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Something went wrong while changing the UID\n"); - exit(wrapper_exit_code); - } -@@ -345,7 +374,7 @@ int main (int argc, char *argv[]) - .is_silentexist = false, - .set_namespace = false, - .verbosity = 1, -- .uid = -1, -+ .uid = NULL, - .xid = VC_DYNAMIC_XID, - .personality_type = VC_BAD_PERSONALITY, - .personality_flags = 0, -@@ -369,7 +398,7 @@ int main (int argc, char *argv[]) - case CMD_SILENTEXIST : args.is_silentexist = true; break; - case CMD_SYNCSOCK : args.sync_sock = optarg; break; - case CMD_SYNCMSG : args.sync_msg = optarg; break; -- case CMD_UID : args.uid = atol(optarg); break; -+ case CMD_UID : args.uid = optarg; break; - case CMD_XID : args.xid = Evc_xidopt2xid(optarg,true); break; - case CMD_SILENT : --args.verbosity; break; - case CMD_PERSTYPE : diff --git a/util-vserver/patches/0.30.210-r18/200_all_sharedportage.patch b/util-vserver/patches/0.30.210-r18/200_all_sharedportage.patch deleted file mode 100644 index 0038e5d..0000000 --- a/util-vserver/patches/0.30.210-r18/200_all_sharedportage.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/fstab -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/fstab -+++ util-vserver-0.30.210/distrib/misc/fstab -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r18/205_all_clone.patch b/util-vserver/patches/0.30.210-r18/205_all_clone.patch deleted file mode 100644 index db0fc22..0000000 --- a/util-vserver/patches/0.30.210-r18/205_all_clone.patch +++ /dev/null @@ -1,102 +0,0 @@ -Index: util-vserver-0.30.210/contrib/manifest.dat.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst -+++ util-vserver-0.30.210/contrib/manifest.dat.pathsubst -@@ -7,6 +7,7 @@ build @PKGLIBDIR@/vserver-build.skeleto - build @PKGLIBDIR@/vserver-build.debootstrap - build @PKGLIBDIR@/vserver-build.yum - build @PKGLIBDIR@/vserver-build.rpm -+build @PKGLIBDIR@/vserver-build.clone - build @PKGLIBDIR@/vserver-build.functions - build @PKGLIBDIR@/vserver-build.functions.apt - build @PKGLIBDIR@/vserver-build.functions.rpm -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -43,6 +43,7 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver-build.debootstrap \ - scripts/vserver-build.rpm \ - scripts/vserver-build.yum \ -+ scripts/vserver-build.clone \ - scripts/vserver-build.functions \ - scripts/vserver-build.functions.apt \ - scripts/vserver-build.functions.rpm \ -Index: util-vserver-0.30.210/scripts/vserver-build -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver-build -+++ util-vserver-0.30.210/scripts/vserver-build -@@ -126,7 +126,7 @@ setup_setDefaults "$VSERVER_NAME" - - case x"$method" in - (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; -- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm) -+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone) - . $__PKGLIBDIR/vserver-build.$method - ;; - (x) panic $"No build-method specified";; -Index: util-vserver-0.30.210/scripts/vserver-build.clone -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/scripts/vserver-build.clone -@@ -0,0 +1,60 @@ -+# $Id$ --*- sh -*-- -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+tmp=$(getopt -o '+d:' --long debug,pkgmgmt,source: -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+DISTRIBUTION=: -+use_pkgmgmt= -+source= -+ -+while true; do -+ case "$1" in -+ -d) DISTRIBUTION=$2; shift;; -+ --debug) set -x;; -+ --pkgmgmt) use_pkgmgmt=1;; -+ --source) source=$2; shift;; -+ --) shift; break ;; -+ *) echo "vserver-build.clone: internal error: unrecognized option '$1'" >&2 -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+test -z "$source" && panic $"vserver-build.clone: --source <vserver> is required!" -+ -+getDistribution '' 1 -+ -+base.init -+test -z "$use_pkgmgmt" || pkgmgmt.initVariables -+ -+base.initFilesystem "$OPTION_FORCE" -+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE" -+ -+setup_writeOption "$VSERVER_NAME" -+setup_writeInitialFstab -+ -+$_CP -a "$__CONFDIR/$source/vdir/." "$VDIR" -+ -+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+test -z "$1" || "$@" -+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+base.setSuccess diff --git a/util-vserver/patches/0.30.210-r18/215_all_cpuset.patch b/util-vserver/patches/0.30.210-r18/215_all_cpuset.patch deleted file mode 100644 index a61ba1b..0000000 --- a/util-vserver/patches/0.30.210-r18/215_all_cpuset.patch +++ /dev/null @@ -1,180 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver-setup.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver-setup.functions -+++ util-vserver-0.30.210/scripts/vserver-setup.functions -@@ -24,11 +24,15 @@ SETUP_LOCKFILE= - SETUP_CONFDIR= - SETUP_CONTEXT= - SETUP_INITSTYLE= -+SETUP_CPUSET= -+SETUP_CPUSETCPUS= -+SETUP_CPUSETMEMS= -+SETUP_CPUSETVIRT= - - declare -a SETUP_INTERFACES=() - declare -a SETUP_FLAGS=() - --declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:" -+declare -r SETUP_OPTIONS="confdir:,lockfile:,hostname:,netdev:,netmask:,netprefix:,netbcast:,interface:,flags:,context:,initstyle:,cpuset:,cpusetcpus:,cpusetmems:,cpusetvirt" - declare -r SETUP_HELPMSG=$" - --context ... the static context of the vserver [default: none; a dynamic - context will be assumed] -@@ -55,6 +59,19 @@ declare -r SETUP_HELPMSG=$" - this becomes a per vserver limit) - private: No other process can join this security context. - Even root -+ --cpuset <name> -+ ... declares the CPUSET this vserver will run in [default: none] -+ --cpusetcpus <number[-number][:<exclusive>]> -+ ... sets which cpus belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those cpus -+ --cpusetmems <number[-number][:<exclusive>]> -+ ... sets which memory pools belong to the CPUSET, -+ exclusive is a flag (0|1) prohibiting any other cpuset from -+ using those memory pools -+ --cpusetvirt -+ ... virtualize cpuset (guest will see only CPUs defined in cpuset) -+ Requires kernel patch from http://www.bullopensource.org/cpuset/ - --initstyle <style> - ... configures the initstyle (e.g. minit,sysv,plain) - " -@@ -71,7 +88,23 @@ function setup_setOption2 - (--netprefix) SETUP_NETPREFIX=$2;; - (--netbcast) SETUP_NETBCAST=$2;; - (--interface) SETUP_INTERFACES=( "${SETUP_INTERFACES[@]}" "$2" );; -- (--initstyle) SETUP_INITSTYLE=$2;; -+ (--initstyle) SETUP_INITSTYLE=$2;; -+ (--cpuset) SETUP_CPUSET=$2;; -+ (--cpusetcpus) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETCPUS=$1 -+ SETUP_CPUSETCPUSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetmems) old_IFS=$IFS -+ IFS=: -+ set -- $2 -+ SETUP_CPUSETMEMS=$1 -+ SETUP_CPUSETMEMSEXCL=$2 -+ IFS=$old_IFS -+ ;; -+ (--cpusetvirt) SETUP_CPUSETVIRT=1;; - (--flags) old_IFS=$IFS - IFS=, - set -- $2 -@@ -140,7 +173,7 @@ function setup_writeOption - local cfgdir=${SETUP_CONFDIR:?} - local i - -- mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts -+ mkdir -p "$cfgdir"/interfaces "$cfgdir"/apps/init "$cfgdir"/uts "$cfgdir"/cpuset - - _setup_writeSingleOption "$name" "$cfgdir"/name - _setup_writeSingleOption "$SETUP_CONTEXT" "$cfgdir"/context -@@ -150,6 +183,12 @@ function setup_writeOption - _setup_writeSingleOption "$SETUP_NETPREFIX" "$cfgdir"/interfaces/prefix - _setup_writeSingleOption "$SETUP_NETBCAST" "$cfgdir"/interfaces/bcast - _setup_writeSingleOption "$SETUP_INITSTYLE" "$cfgdir"/apps/init/style -+ _setup_writeSingleOption "$SETUP_CPUSET" "$cfgdir"/cpuset/name -+ _setup_writeSingleOption "$SETUP_CPUSETCPUS" "$cfgdir"/cpuset/cpus -+ _setup_writeSingleOption "$SETUP_CPUSETCPUSEXCL" "$cfgdir"/cpuset/cpus_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETMEMS" "$cfgdir"/cpuset/mems -+ _setup_writeSingleOption "$SETUP_CPUSETMEMSEXCL" "$cfgdir"/cpuset/mem_exclusive -+ _setup_writeSingleOption "$SETUP_CPUSETVIRT" "$cfgdir"/cpuset/virtualize - - local idx=0 - for i in "${SETUP_INTERFACES[@]}"; do -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -687,6 +687,54 @@ function generateOptions - fi - } - -+function addtoCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ local i -+ local configured=0 -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ test -d /dev/cpuset/"$cpuset" || mkdir /dev/cpuset/"$cpuset" || configured=1 -+ for i in cpus mems cpu_exclusive mem_exclusive virtualize; do -+ if test -e "$f"/"$i"; then -+ cat "$f"/"$i" >/dev/cpuset/"$cpuset"/"$i" 2>/dev/null || { -+ configured=1 -+ break -+ } -+ fi -+ done -+ } -+ -+ echo $$ >/dev/cpuset/"$cpuset"/tasks || configured=1 -+ if [ "$configured" -ne 0 ]; then -+ warning $"\ -+WARNING: Failed to create or CPUSET \"$cpuset\" does not exist! Not using it!" >&2 -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ return 0 -+ fi -+} -+ -+function removeCPUSET -+{ -+ local vdir=$1 -+ local cpuset -+ local f="$vdir"/cpuset -+ -+ test -d "$f" || return 0 -+ test -e "$f"/name || return 0 -+ -+ read cpuset < "$f"/name -+ test -e "$f"/nocreate || { -+ rmdir /dev/cpuset/"$cpuset" 2>/dev/null || : -+ } -+} -+ - function _mountVserverInternal - { - local fstab="$1" -Index: util-vserver-0.30.210/scripts/vserver.start -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.start -+++ util-vserver-0.30.210/scripts/vserver.start -@@ -113,6 +113,7 @@ enableInterfaces "$VSERVER_DIR" && have_ - - mountVserver "$VSERVER_DIR" && is_mounted=1 - prepareInit "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - pushd "$VSERVER_DIR"/vdir/ >/dev/null - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" pre-start -Index: util-vserver-0.30.210/scripts/vserver.stop -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.stop -+++ util-vserver-0.30.210/scripts/vserver.stop -@@ -101,3 +101,4 @@ disableInterfaces "$VSERVER_DIR" - saveDiskLimits "$VSERVER_DIR" - - execScriptlets "$VSERVER_DIR" "$VSERVER_NAME" postpost-stop -+removeCPUSET "$VSERVER_DIR" -Index: util-vserver-0.30.210/scripts/vserver.suexec -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.suexec -+++ util-vserver-0.30.210/scripts/vserver.suexec -@@ -22,6 +22,7 @@ test -z "$is_stopped" -o "$OPTION_INSECU - exit 1 - } - generateOptions "$VSERVER_DIR" -+addtoCPUSET "$VSERVER_DIR" - - user=$1 - shift diff --git a/util-vserver/patches/0.30.210-r18/220_all_delete.patch b/util-vserver/patches/0.30.210-r18/220_all_delete.patch deleted file mode 100644 index 30acc86..0000000 --- a/util-vserver/patches/0.30.210-r18/220_all_delete.patch +++ /dev/null @@ -1,86 +0,0 @@ -Index: util-vserver-0.30.210/contrib/manifest.dat.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst -+++ util-vserver-0.30.210/contrib/manifest.dat.pathsubst -@@ -19,6 +19,7 @@ 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 - core @PKGLIBDIR@/util-vserver-vars - build @PKGLIBDIR@/rpm-fake.so - legacy @LEGACYDIR@/save_s_context -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -53,7 +53,8 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver.functions \ - scripts/vserver.start \ - scripts/vserver.stop \ -- scripts/vserver.suexec -+ scripts/vserver.suexec \ -+ scripts/vserver.delete - - scripts_pkglib_gen_DTA = scripts/util-vserver-vars - -Index: util-vserver-0.30.210/scripts/vserver -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver -+++ util-vserver-0.30.210/scripts/vserver -@@ -57,6 +57,7 @@ Possible commands are: - - build <buildopts>* - ... builds a new vserver from scratch -+ delete ... remove a vserver - - unify [-R] - ... (de)unify vserver -@@ -199,7 +200,7 @@ test "$2" != start -o -n "$OPTION_NONAME - - . $__PKGLIBDIR/vserver.functions - case "$2" in -- (start|stop) -+ (start|stop|delete) - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -Index: util-vserver-0.30.210/scripts/vserver.delete -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/scripts/vserver.delete -@@ -0,0 +1,34 @@ -+#! /bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS" -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+if test -z "$OPTION_SILENT" ; then -+ read -p "Are you sure you want to delete the vserver $vserver (y/N) " deleteok -+ if [[ ${deleteok} != [Yy] ]]; then -+ exit 2 -+ fi -+fi -+ -+isVserverRunning "$VSERVER_DIR" && -+ "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ -+base.init -+pkgmgmt.initVariables -+rm -rf "`readlink -f "$VSERVER_DIR"/vdir`" "$VSERVER_DIR" "$PKGCFGDIR" diff --git a/util-vserver/patches/0.30.210-r18/225_all_gentoo-tools.patch b/util-vserver/patches/0.30.210-r18/225_all_gentoo-tools.patch deleted file mode 100644 index bcffb4a..0000000 --- a/util-vserver/patches/0.30.210-r18/225_all_gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -70,6 +71,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -87,7 +89,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r18/235_all_namespace-cleanup.patch b/util-vserver/patches/0.30.210-r18/235_all_namespace-cleanup.patch deleted file mode 100644 index d5b7550..0000000 --- a/util-vserver/patches/0.30.210-r18/235_all_namespace-cleanup.patch +++ /dev/null @@ -1,120 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 12_vnamespace_cleanup.dpatch by Micah Anderson <Micah Anderson <micah@debian.org>> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. - -@DPATCH@ -Index: util-vserver-0.30.210/doc/configuration.xml -=================================================================== ---- util-vserver-0.30.210.orig/doc/configuration.xml -+++ util-vserver-0.30.210/doc/configuration.xml -@@ -37,6 +37,14 @@ the 'barrier' attribute. Else, common ch - </description> - </boolean> - -+ <boolean id="global-namespace-cleanup" name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup globally. It can be overridden for a single vserver -+by setting the <optionref ref="global-nonamespace-cleanup">nonamespace-cleanup</optionref> flag -+there. -+ </description> -+ </boolean> -+ - <link name="run.rev"> - <description> - Path of the vserver run reverse directory. This directory contains -@@ -344,6 +352,19 @@ the 'barrier' attribute. Else, common ch - </description> - </boolean> - -+ <boolean id="global-nonamespace-cleanup" name="nonamespace-cleanup"> -+ <description> -+Overrides the global <optionref ref="global-namespace-cleanup">namespace-cleanup</optionref> flag and disables -+namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ -+ <boolean name="namespace-cleanup"> -+ <description> -+Enable namespace cleanup for the current vserver. -+ </description> -+ </boolean> -+ - <hash name="schedule"> - <description> - [experimental; name is subject of possible change] Contains the -Index: util-vserver-0.30.210/scripts/functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/functions -+++ util-vserver-0.30.210/scripts/functions -@@ -480,6 +480,18 @@ function isAvoidNamespace - -e "$cfgdir"/nonamespace - } - -+function isNamespaceCleanup -+{ -+ local cfgdir -+ -+ $_VSERVER_INFO - FEATURE namespace || return 0 -+ cfgdir=$($_VSERVER_INFO "$1" CFGDIR) || return 0 -+ test -e "$cfgdir"/nonamespace-cleanup && return 0 -+ test -e "$__CONFDIR"/.defaults/namespace-cleanup -o \ -+ -e "$cfgdir"/namespace-cleanup && return 1 -+ return 0 -+} -+ - ## Usage: getAllVservers <var> [<KIND>*] - function getAllVservers - { -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -792,13 +792,13 @@ function mountVserver - - test -n "$_HAVE_CHBIND_OPTIONS" || _generateChbindOptions "$cfgdir" - -- test -z "$NAMESPACE_CLEANUP" || isAvoidNamespace "$cfgdir" || \ -- $_VNAMESPACE --cleanup -- - _mountVserverInternal "$cfgdir"/fstab - _mountVserverInternal "$cfgdir"/fstab.local - _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" - -+ isNamespaceCleanup "$cfgdir" || \ -+ _namespaceCleanup -+ - isAvoidNamespace "$cfgdir" || \ - $_SECURE_MOUNT --rbind -n "$vdir" "/" - } -@@ -1150,3 +1150,29 @@ function saveDiskLimits - _saveSingleDiskLimit "$vdir" "$dlimit" - done - } -+ -+function _namespaceCleanup -+{ -+ local root=$(readlink -f "$vdir") -+ local tmp="$root" -+ local list="" -+ while [ "$tmp" ]; do -+ list="$list $tmp" -+ tmp="${tmp%/*}" -+ done -+ local list_umount="" -+ while read dev path opts; do -+ [ "$path" ] || continue -+ for i in $root /dev /proc; do -+ [ "${path#$i}" != "$path" ] && continue 2 -+ done -+ for i in $list /; do -+ [ "$path" = "$i" ] && continue 2 -+ done -+ list_umount="$path $list_umount" -+ done < /proc/mounts -+ for i in $list_umount; do -+ umount $i -+ done -+} -+ diff --git a/util-vserver/patches/0.30.210-r18/240_all_pkgmgmt-vsomething.patch b/util-vserver/patches/0.30.210-r18/240_all_pkgmgmt-vsomething.patch deleted file mode 100644 index fe482c5..0000000 --- a/util-vserver/patches/0.30.210-r18/240_all_pkgmgmt-vsomething.patch +++ /dev/null @@ -1,282 +0,0 @@ -Index: util-vserver-0.30.210/scripts/functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/functions -+++ util-vserver-0.30.210/scripts/functions -@@ -268,6 +268,16 @@ function unlock - _VS_LOCKS="$@" - } - -+function _getVserverDir -+{ -+ local vserver="$1" -+ case "$vserver" in -+ ./*) VSERVER_DIR=`pwd`/$vserver ;; -+ /*) VSERVER_DIR=$vserver ;; -+ *) VSERVER_DIR=$__CONFDIR/$vserver;; -+ esac -+} -+ - function _pkgMountBindDir() - { - test "$1" != "$2" || return 0 -Index: util-vserver-0.30.210/scripts/vapt-get -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vapt-get -+++ util-vserver-0.30.210/scripts/vapt-get -@@ -1,7 +1,7 @@ - #! /bin/bash --# $Id: vapt-get,v 1.14 2005/01/27 21:24:44 ensc Exp $ -+# $Id$ - --# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - # - # 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 -@@ -31,7 +31,7 @@ function showHelp() - $"Usage: $0 <vserver-name>* [--all] -- <params>+ - - Report bugs to <$PACKAGE_BUGREPORT>." -- exit $1 -+ exit 0 - } - - function showVersion() -@@ -40,60 +40,35 @@ function showVersion() - $"vapt-get $PACKAGE_VERSION -- apt-get for vservers - This program is part of $PACKAGE_STRING - --Copyright (C) 2003 Enrico Scholz -+Copyright (C) 2006 Enrico Scholz - This program is free software; you may redistribute it under the terms of - the GNU General Public License. This program has absolutely no warranty." -- exit $1 -+ exit 0 - } - --is_quiet= --declare -a vservers=() -+tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" - --while test "$#" -ge 1; do -+declare -a send_through vsomething_opts -+ -+while true; do - case "$1" in -- --) shift; break;; -- --help) showHelp 0;; -- --quiet|-q) is_quiet=1 ;; -- --all) -- getAllVservers tmp -- vservers=( "${vservers[@]}" "${tmp[@]}" ) -- ;; -- --version) -- showVersion 0;; -- *) vservers=( "${vservers[@]}" "$1" ) -- esac -- shift -+ (--help) showHelp $0 ;; -+ (--version) showVersion ;; -+ (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; -+ (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; -+ (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; -+ (--) shift; break;; -+ (*) echo $"vapt-get: internal error; arg=='$1'" >&2; exit 1;; -+ esac -+ shift - done - --test "$#" -ge 1 || showHelp 1 >&2 --test "${#vservers[@]}" -ne 1 || is_quiet=1 -+VSOMETHING_TITLE=vapt-get -+VSOMETHING_WORKER=$_VAPT_GET_WORKER -+VSOMETHING_PKGMGMT=1 - --cnt=0 --res=255 --for i in "${vservers[@]}"; do -- cnt=$[ cnt + 1 ] -- -- test -n "$is_quiet" || { -- colorize bold echo -n "vaptget: operating on vserver " -- colorize bold colorize emph echo "$i" -- xtermTitle "vaptget: operating on vserver '$i' [$cnt/${#vservers[@]}]" -- } -- -- if pkgmgmt.isInternal "$i"; then -- $_VSERVER "$i" exec apt-get "$@" -- else -- callInNamespace "$i" \ -- "$_VNAMESPACE" --new -- "$_VAPT_GET_WORKER" "$i" "$@" -- fi -- res=$? -- -- test $res -eq 0 -o -n "$is_quiet" || { -- colorize error echo -n $"vapt-get failed on vserver '$i' with errorcode $res" -- echo -- } -- -- test -n "$is_quiet" || echo --done -+export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT - --test "$cnt" -ge 0 || echo "No vservers specified" >&2 --exit $res -+test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- ) -+exec $_VSOMETHING "${send_through[@]}" apt-get "${vsomething_opts[@]}" "$@" -Index: util-vserver-0.30.210/scripts/vrpm -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vrpm -+++ util-vserver-0.30.210/scripts/vrpm -@@ -1,7 +1,7 @@ - #! /bin/bash --# $Id: vrpm,v 1.13 2005/01/27 21:24:44 ensc Exp $ -+# $Id$ - --# Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - # - # 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 -@@ -24,14 +24,14 @@ test -e "$UTIL_VSERVER_VARS" || { - . "$UTIL_VSERVER_VARS" - . "$_LIB_FUNCTIONS" - -+ - function showHelp() - { - echo \ --$"Usage: $0 <vserver-name>* [--all] [--quiet|-q] [--help] [--version] [--unify] -- <rpm-params>+ -+$"Usage: $0 <vserver-name>* [--all] -- <params>+ - - Report bugs to <$PACKAGE_BUGREPORT>." -- -- exit $1 -+ exit 0 - } - - function showVersion() -@@ -40,71 +40,35 @@ function showVersion() - $"vrpm $PACKAGE_VERSION -- rpm for vservers - This program is part of $PACKAGE_STRING - --Copyright (C) 2003 Enrico Scholz -+Copyright (C) 2006 Enrico Scholz - This program is free software; you may redistribute it under the terms of - the GNU General Public License. This program has absolutely no warranty." -- -- exit $1 -+ exit 0 - } - --do_unify= --is_quiet= --declare -a vservers=() -+tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" - --while test "$#" -ge 1; do -+declare -a send_through vsomething_opts -+ -+while true; do - case "$1" in -- --quiet|-q) -- is_quiet=1 -- ;; -- --all) -- getAllVservers tmp -- vservers=( "${vservers[@]}" "${tmp[@]}" ) -- ;; -- --unify) -- do_unify=1 -- ;; -- --) -- shift; break;; -- --help) -- showHelp 0;; -- --version) -- showVersion 0;; -- *) vservers=( "${vservers[@]}" "$1" ) -- esac -- shift -+ (--help) showHelp $0 ;; -+ (--version) showVersion ;; -+ (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; -+ (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; -+ (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; -+ (--) shift; break;; -+ (*) echo $"vrpm: internal error; arg=='$1'" >&2; exit 1;; -+ esac -+ shift - done - --test "$#" -ge 1 || showHelp 1 >&2 --test "${#vservers[@]}" -ne 1 || is_quiet=1 -- --cnt=0 --res=255 -+VSOMETHING_TITLE=vrpm -+VSOMETHING_WORKER=$_VRPM_WORKER -+VSOMETHING_PKGMGMT=1 - --for i in "${vservers[@]}"; do -- cnt=$[ cnt + 1 ] -- -- test -n "$is_quiet" || { -- colorize bold echo -n "vrpm: operating on vserver " -- colorize bold colorize emph echo "$i" -- xtermTitle "vrpm: operating on vserver '$i' [$cnt/${#vservers[@]}]" -- } -- -- if pkgmgmt.isInternal "$i"; then -- $_VSERVER "$i" exec rpm "$@" -- else -- callInNamespace "$i" \ -- "$_VNAMESPACE" --new -- "$_VRPM_WORKER" "$i" "$@" -- fi -- res=$? -- -- test $res -eq 0 -o "$is_quiet" || { -- colorize error echo -n $"vrpm failed on vserver '$i' with errorcode $res" -- echo -- } -- -- test -n "$is_quiet" || echo --done -+export VSOMETHING_TITLE VSOMETHING_WORKER VSOMETHING_PKGMGMT - --test -z "$do_unify" || echo "unify currently unsupported" >&2 --test "$cnt" -ge 0 || echo "No vservers specified" >&2 --exit $res -+test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- ) -+exec $_VSOMETHING "${send_through[@]}" rpm "${vsomething_opts[@]}" "$@" -Index: util-vserver-0.30.210/scripts/vsomething -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vsomething -+++ util-vserver-0.30.210/scripts/vsomething -@@ -23,6 +23,7 @@ test -e "$UTIL_VSERVER_VARS" || { - } - . "$UTIL_VSERVER_VARS" - . "$_LIB_FUNCTIONS" -+. "$__PKGLIBDIR/vserver.functions" - - - function showHelp() -@@ -105,8 +106,14 @@ for i in "${vservers[@]}"; do - if pkgmgmt.isInternal "$i"; then - $_VSERVER "$i" exec "$cmd" "$@" - else -- callInNamespace "$i" \ -- "$_VNAMESPACE" --new -- "$VSOMETHING_WORKER" "$i" "$@" -+ _getVserverDir "$i" -+ ( _generateChbindOptions "$VSERVER_DIR" -+ $_VSERVER "$i" status >& /dev/null && \ -+ CHBIND_CMD=( "$_CHBIND" "${CHBIND_OPTS[@]}" -- ) -+ callInNamespace "$i" \ -+ "$_VNAMESPACE" --new -- \ -+ "${CHBIND_CMD[@]}" \ -+ "$VSOMETHING_WORKER" "$i" "$@" ) - fi - else - "$cmd" "$i" "$@" diff --git a/util-vserver/patches/0.30.210-r18/245_all_template.patch b/util-vserver/patches/0.30.210-r18/245_all_template.patch deleted file mode 100644 index 492acd3..0000000 --- a/util-vserver/patches/0.30.210-r18/245_all_template.patch +++ /dev/null @@ -1,230 +0,0 @@ -Index: util-vserver-0.30.210/configure.ac -=================================================================== ---- util-vserver-0.30.210.orig/configure.ac -+++ util-vserver-0.30.210/configure.ac -@@ -56,6 +56,11 @@ ENSC_PATHPROG(NOHUP, nohup) - 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(FILE, file, [file]) -+ENSC_PATHPROG(GZIP, gzip, [gzip]) -+ENSC_PATHPROG(BZIP2, bzip2, [bzip2]) -+ENSC_PATHPROG(CPIO, cpio, [cpio]) -+ENSC_PATHPROG(RESTORE, restore, [restore]) - - ENSC_PATHPROG(DOXYGEN, doxygen, [:]) - ENSC_PATHPROG(XSLTP, xsltp, [:]) -Index: util-vserver-0.30.210/contrib/manifest.dat.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/contrib/manifest.dat.pathsubst -+++ util-vserver-0.30.210/contrib/manifest.dat.pathsubst -@@ -8,6 +8,7 @@ build @PKGLIBDIR@/vserver-build.deboots - build @PKGLIBDIR@/vserver-build.yum - build @PKGLIBDIR@/vserver-build.rpm - build @PKGLIBDIR@/vserver-build.clone -+build @PKGLIBDIR@/vserver-build.template - build @PKGLIBDIR@/vserver-build.functions - build @PKGLIBDIR@/vserver-build.functions.apt - build @PKGLIBDIR@/vserver-build.functions.rpm -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -39,6 +39,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - scripts_pkglib_src_DTA = scripts/functions \ - scripts/gentoo-functions.sh \ -+ scripts/magic.mime \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -50,6 +51,7 @@ scripts_pkglib_src_DTA = scripts/functio - scripts/vserver-build.functions.rpm \ - scripts/vserver-build.functions.pkgmgmt \ - scripts/vserver-build.functions.yum \ -+ scripts/vserver-build.template \ - scripts/vserver-setup.functions \ - scripts/vserver.functions \ - scripts/vserver.start \ -Index: util-vserver-0.30.210/scripts/magic.mime -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/scripts/magic.mime -@@ -0,0 +1,19 @@ -+# Borrowed from file(1) -+# gzip (GNU zip, not to be confused with [Info-ZIP/PKWARE] zip archiver) -+0 string \037\213 application/x-gzip -+# tar posix -+257 string ustar\0 application/x-tar -+# tar gnu -+257 string ustar\040\040\0 application/x-tar -+# cpio -+0 short 070707 application/x-cpio -+# cpio swapped -+0 short 0143561 application/x-cpio -+# bzip2 -+0 string BZh application/x-bzip2 -+# dump/restore new-fs big and little endian -+24 belong 60012 application/x-dump -+24 lelong 60012 application/x-dump -+# dump/restore old-fs big and little endian -+24 belong 60011 application/x-dump -+24 lelong 60011 application/x-dump -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_MAGIC="$__PKGLIBDIR/magic" - _LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" -@@ -103,14 +104,18 @@ _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - - _AWK="@AWK@" -+_BZIP2="@BZIP2@" - _CAT="@CAT@" - _CHOWN="@CHOWN@" - _CMP="@CMP@" - _CP="@CP@" -+_CPIO="@CPIO@" - _DIRNAME="@DIRNAME@" - _EGREP="@EGREP@" - _ENV="@ENV@" -+_FILE="@FILE@" - _GREP="@GREP@" -+_GZIP="@GZIP@" - _IP="@IP@" - _IPTABLES="@IPTABLES@" - _LN="@LN@" -@@ -125,6 +130,7 @@ _MV="@MV@" - _NAMEIF="@NAMEIF@" - _NICE="@NICE@" - _NOHUP="@NOHUP@" -+_RESTORE="@RESTORE@" - _RM="@RM@" - _RMDIR="@RMDIR@" - _RMMOD="@RMMOD@" -Index: util-vserver-0.30.210/scripts/vserver-build -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver-build -+++ util-vserver-0.30.210/scripts/vserver-build -@@ -66,6 +66,8 @@ Possible methods are: - configuration file and calls an optional command then - debootstrap ... -- -d <distribution> [-m <mirror>] [-s <script> ] [-- <debootstrap-options>*] - bootstraps the vserver with Debian's 'debootstrap' package -+ template ... -- (-t <tarball>)+ -+ ... installs a guest using tarball(s) - - Please report bugs to $PACKAGE_BUGREPORT" - exit 0 -@@ -126,7 +128,7 @@ setup_setDefaults "$VSERVER_NAME" - - case x"$method" in - (xlegacy) exec $_VSERVER_LEGACY "$VSERVER_NAME" build "$@" ;; -- (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone) -+ (xapt-rpm|xcopy|xskeleton|xdebootstrap|xyum|xrpm|xclone|xtemplate) - . $__PKGLIBDIR/vserver-build.$method - ;; - (x) panic $"No build-method specified";; -Index: util-vserver-0.30.210/scripts/vserver-build.template -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/scripts/vserver-build.template -@@ -0,0 +1,92 @@ -+# $Id:$ --*- sh -*-- -+ -+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+tmp=$(getopt -o '+d:t:' --long debug,pkgmgmt,template: -n "vserver-build.template" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+. "$_LIB_VSERVER_BUILD_FUNCTIONS_PKGMGMT" -+ -+DISTRIBUTION=: -+use_pkgmgmt= -+declare -a TEMPLATE=() -+while true; do -+ case "$1" in -+ -d) DISTRIBUTION=$2; shift;; -+ --debug) set -x;; -+ --pkgmgmt) use_pkgmgmt=1;; -+ -t|--template) -+ case "$2" in -+ /*) f="$2";; -+ *) f=`pwd`/"$2";; -+ esac -+ TEMPLATE=( "${TEMPLATE[@]}" "$f" ) -+ shift -+ ;; -+ --) shift; break ;; -+ *) echo "vserver-build.template: internal error: unrecognized option '$1'" >&2 -+ exit 1 -+ ;; -+ esac -+ shift -+done -+ -+getDistribution '' 1 -+ -+base.init -+test -z "$use_pkgmgmt" || pkgmgmt.initVariables -+ -+base.initFilesystem "$OPTION_FORCE" -+test -z "$use_pkgmgmt" || pkgmgmt.initFilesystem "$OPTION_FORCE" -+ -+ -+setup_writeOption "$VSERVER_NAME" -+setup_writeInitialFstab -+ -+test -z "$BUILD_INITPRE" || "$BUILD_INITPRE" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+pushd "$SETUP_CONFDIR/vdir" >& /dev/null -+for t in "${TEMPLATE[@]}"; do -+ mime=$($_FILE -Nbiz -m "$_LIB_MAGIC" "$t") -+ compression=$(echo "$mime" | $_GREP '(' | $_SED 's!.*(\(.*\))$!\1!') -+ -+ case "$compression" in -+ application/x-bzip2) DECOMPRESS="$_BZIP2 -d -c";; -+ application/x-gzip) DECOMPRESS="$_GZIP -d -c";; -+ "") DECOMPRESS=$_CAT;; -+ *) -+ echo "Unsupported compression method: $compression" -+ exit 1 -+ ;; -+ esac -+ -+ case "$mime" in -+ application/x-tar*) EXTRACT="$_TAR -x";; -+ application/x-cpio*) EXTRACT="$_CPIO -i";; -+ application/x-dump*) EXTRACT="$_RESTORE -rf -";; -+ *) -+ echo "Unsupported packaging method: $mime" -+ exit 1 -+ ;; -+ esac -+ -+ $DECOMPRESS "$t" | $EXTRACT -+done -+popd >& /dev/null -+ -+test -z "$BUILD_INITPOST" || "$BUILD_INITPOST" "$SETUP_CONFDIR" "$UTIL_VSERVER_VARS" -+ -+base.setSuccess diff --git a/util-vserver/patches/0.30.210-r18/250_all_vlogin.patch b/util-vserver/patches/0.30.210-r18/250_all_vlogin.patch deleted file mode 100644 index a450bf7..0000000 --- a/util-vserver/patches/0.30.210-r18/250_all_vlogin.patch +++ /dev/null @@ -1,461 +0,0 @@ -Index: util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -Index: util-vserver-0.30.210/ensc_wrappers/wrappers.h -=================================================================== ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h -+++ util-vserver-0.30.210/ensc_wrappers/wrappers.h -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -Index: util-vserver-0.30.210/src/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/src/Makefile-files -+++ util-vserver-0.30.210/src/Makefile-files -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -Index: util-vserver-0.30.210/src/vcontext.c -=================================================================== ---- util-vserver-0.30.210.orig/src/vcontext.c -+++ util-vserver-0.30.210/src/vcontext.c -@@ -65,6 +65,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -88,6 +89,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -103,6 +105,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -115,6 +118,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(int argc, char *argv[], int ind); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -148,6 +153,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -236,7 +242,7 @@ doExternalSync(int fd, char const *msg) - } - - static inline ALWAYSINLINE int --doit(struct Arguments const *args, char *argv[]) -+doit(struct Arguments const *args, int argc, char *argv[]) - { - int p[2][2]; - pid_t pid = initSync(p, args->do_disconnect); -@@ -316,12 +322,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argc, argv, optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -370,6 +379,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -392,6 +402,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -@@ -437,7 +448,7 @@ int main (int argc, char *argv[]) - else if (optind>=argc) - WRITE_MSG(2, "No command given; use '--help' for more information.\n"); - else -- return doit(&args, argv); -+ return doit(&args, argc, argv); - - return wrapper_exit_code; - } -Index: util-vserver-0.30.210/src/vlogin.c -=================================================================== ---- /dev/null -+++ util-vserver-0.30.210/src/vlogin.c -@@ -0,0 +1,281 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <strings.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* convert terminal settings to raw mode */ -+ cfmakeraw(&buf); -+ -+ /* apply raw terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activities */ -+static void -+terminal_copy(int src, int dst) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(src, buf, sizeof(buf)); -+ -+ /* write activity to user */ -+ EwriteAll(dst, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(int argc, char *argv[], int ind) -+{ -+ int slave; -+ pid_t pid; -+ int n, i; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[ind], argv+ind); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[ind], argv+ind); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* set process title for ps */ -+ n = strlen(argv[0]); -+ -+ for (i = 0; i < argc; i++) -+ bzero(argv[i], strlen(argv[i])); -+ -+ strncpy(argv[0], "login", n); -+ -+ /* reset terminal to its original mode */ -+ atexit(terminal_reset); -+ -+ /* we want a redraw */ -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ terminal_copy(STDIN_FILENO, t.fd); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_copy(t.fd, STDOUT_FILENO); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r18/255_all_shell-completion.patch b/util-vserver/patches/0.30.210-r18/255_all_shell-completion.patch deleted file mode 100644 index 8e9bae1..0000000 --- a/util-vserver/patches/0.30.210-r18/255_all_shell-completion.patch +++ /dev/null @@ -1,498 +0,0 @@ -Index: util-vserver-0.30.210/contrib/bash_completion -=================================================================== ---- /dev/null -+++ contrib/bash_completion -@@ -0,0 +1,300 @@ -+# Completion for the vserver command. Source this file (or on some systems -+# add it to ~/.bash_completion and start a new shell) and bash's completion -+# mechanism will know all about vserver's options! -+# -+# Copyright (C) Thomas Champagne <lafeuil@gmail.com> -+# -+# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# -+# The latest version of this software can be obtained here: -+# -+# http://linux-vserver.org/Vserver+Completion -+# -+# version 0.4.0 -+ -+have vserver-info && { -+: ${UTIL_VSERVER_VARS:=$(vserver-info - SYSINFO |grep prefix: | awk '{ print $2}')/lib/util-vserver/util-vserver-vars} -+ -+test -e "$UTIL_VSERVER_VARS" && { -+ -+. "$UTIL_VSERVER_VARS" -+. "$_LIB_FUNCTIONS" -+ -+_vserver() { -+ local cur cmds cmdOpts cmdMethodOpts helpCmds names names_pipe func i j method -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_CWORD]} -+ -+ # find available vServers: -+ # call function getAllVservers in vserver library -+ getAllVservers names -+ names_pipe=`echo ${names[@]} | sed 's/ /|/g'` -+ -+ # available commands -+ cmds='start stop restart condrestart suexec exec enter chkconfig \ -+ running status unify pkg apt-get apt-config apt-cache \ -+ rpm pkgmgmt delete' -+ -+ # options (long and short name) -+ cmdOpts='--help --version --debug --defaulttty -s --sync -v \ -+ --verbose --silent --' -+ -+ cmdMethodOpts='-m -n --context --confdir --lockfile \ -+ --hostname --netdev --netbcast --netmask \ -+ --netprefix --interface --cpuset \ -+ --cpusetcpus --cpusetmems --cpusetvirt \ -+ --initstyle --flags --help --' -+ -+ # if the previous option is a single option -+ helpCmds='--help|--version' -+ if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then -+ return 0 -+ fi -+ -+ # lookup the vServer name -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do -+ if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ #a vserver has been found -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ # Show the vserver command without build -+ case "${COMP_WORDS[i+1]}" in -+ start) -+ COMPREPLY=( $( compgen -W "--rescue --rescue-cmd" -- $cur ) ) -+ ;; -+ # No completion for apt-config -+ stop|restart|condrestart|enter|running|status|apt-config|delete) -+ ;; -+ suexec) -+ # I don't know how to do -+ COMPREPLY=( $( compgen -W -- $cur ) ) -+ ;; -+ exec) -+ #I don't know how to do -+ COMPREPLY=( $( compgen -W "" -- $cur ) ) -+ ;; -+ unify) -+ COMPREPLY=( $( compgen -W "-R" -- $cur ) ) -+ ;; -+ apt-get|apt-cache) -+ func=${COMP_WORDS[i+1]} -+ COMP_WORDS=( ${COMP_WORDS[@]:$((i+1))} ) -+ COMP_CWORD=$((COMP_CWORD-i-1)) -+ declare -f _${func//-/_} > /dev/null && _${func//-/_} -+ ;; -+ *) -+ COMPREPLY=( $( compgen -W "$cmds" -- $cur ) ) -+ ;; -+ esac -+ return 0 -+ else -+ #no vserver name found -+ prev=${COMP_WORDS[COMP_CWORD-1]} -+ -+ #search the new name of vserver -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do -+ if [[ ${COMP_WORDS[i]} == !(vserver|-*) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ j=$i -+ i=${#COMP_WORDS[@]} -+ for (( ; j < ${#COMP_WORDS[@]}-1; j++ )) ; do -+ if [[ ${COMP_WORDS[j]} == "--" ]]; then -+ # method's parameter -+ case "$method" in -+ legacy|copy) -+ ;; -+ apt-rpm) -+ COMPREPLY=( $( compgen -W "-d" -- $cur ) ) -+ ;; -+ yum) -+ COMPREPLY=( $( compgen -W "-d" -- $cur ) ) -+ ;; -+ rpm) -+ COMPREPLY=( $( compgen -W "-d --empty --force --nodeps" -- $cur ) ) -+ ;; -+ skeleton) -+ ;; -+ debootstrap) -+ COMPREPLY=( $( compgen -W "-d -m -s --" -- $cur ) ) -+ ;; -+ *) -+ ;; -+ esac -+ return 0 -+ break -+ fi -+ -+ if [[ ${COMP_WORDS[j]} == @(build|-m) ]]; then -+ i=$j -+ if (( $j+1 < ${#COMP_WORDS[@]}-1 )) ; then -+ method=${COMP_WORDS[j+1]} -+ fi -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ case $prev in -+ --help) -+ ;; -+ -n|--context|--confdir|--lockfile|--hostname|--netdev|--netbcast|--netmask|--netprefix|--interface|--cpuset|--cpusetcpus|--cpusetmems|--cpusetvirt|--initstyle|--flags) -+ COMPREPLY=( $( compgen -W "" -- $cur ) ) -+ ;; -+ -m) -+ COMPREPLY=( $( compgen -W "legacy copy apt-rpm yum rpm skeleton debootstrap" -- $cur ) ) -+ ;; -+ *) -+ COMPREPLY=( $( compgen -W "$cmdMethodOpts" -- $cur ) ) -+ ;; -+ esac -+ else -+ COMPREPLY=( $( compgen -W "build" -- $cur ) ) -+ fi -+ else -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ -+ return 0 -+ fi -+ -+ return 0 -+} -+ -+complete -F _vserver vserver -+ -+_vapt_rpm_yum() -+{ -+ local cur cmds cmdOpts helpCmds names func i -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_CWORD]} -+ -+ # options (long and short name) -+ cmdOpts='--help --version --quiet -q --all' -+ -+ # if the previous option is a single option -+ helpCmds='--help|--version' -+ -+ if [[ "${COMP_WORDS[1]}" == "@($helpCmds)" ]] ; then -+ return 0 -+ fi -+ -+ # search -- -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do -+ if [[ ${COMP_WORDS[i]} = "--" ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ # find available vServers -+ # call function getAllVservers in vserver library -+ getAllVservers names -+ names_pipe=`echo ${names[@]}" --all" | sed 's/ /|/g'` -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) && (( $i < $COMP_CWORD )) ; then -+ func=${COMP_WORDS[0]:1} -+ COMP_WORDS=( $func ${COMP_WORDS[@]:$((i+1))} ) -+ COMP_CWORD=$((COMP_CWORD-i)) -+ declare -f _${func//-/_} > /dev/null && _${func//-/_} -+ else -+ # search vServer name -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do -+ if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ if [[ "${COMP_WORDS[i]}" = "--all" ]] ; then -+ cmdOpts='--' -+ COMPREPLY=( $( compgen -W "$cmdOpts" -- $cur ) ) -+ else -+ cmdOpts='--' -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ else -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ fi -+ -+ return 0 -+} -+ -+_vserver_copy() -+{ -+ local cur prev cmdOpts helpCmds confCmds names names_pipe i -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_CWORD]} -+ -+ # find available vServers -+ # call function getAllVservers in vserver library -+ getAllVservers names -+ names_pipe=`echo ${names[@]} | sed 's/ /|/g'` -+ -+ # options (long and short name) -+ cmdOpts='--help -h --version -V --verbose -v --quiet -q \ -+ --vsroot -r --rsh -R --stopstart -s \ -+ --domain -d --ip -i' -+ -+ # if the previous option is a single option -+ helpCmds='--help|-h|--version|-V' -+ -+ if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then -+ return 0 -+ fi -+ -+ confCmds='--ip|-i|--domain|-d' -+ prev=${COMP_WORDS[COMP_CWORD-1]} -+ -+ if [[ $prev == @($confCmds) ]] ; then -+ return 0 -+ fi -+ -+ # search a vServer name -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do -+ if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ return 0 -+ else -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ -+ return 0 -+} -+ -+complete -F _vapt_rpm_yum vapt-get -+complete -F _vapt_rpm_yum vrpm -+complete -F _vapt_rpm_yum vyum -+complete -F _vserver_copy vserver-copy -+ -+} -+} -Index: util-vserver-0.30.210/contrib/zsh_completion -=================================================================== ---- /dev/null -+++ contrib/zsh_completion -@@ -0,0 +1,188 @@ -+#compdef vserver -+ -+# Copyright (C) 2005 intrigeri@boum.org - property is theft ! -+# -+# 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., -+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+# ,---- -+# | NOTES -+# `---- -+# -+# - SVN version: $Id$ -+# - $URL$ -+# - Tested on Debian GNU/Linux with util-vserver 0.30.209. -+# -+# ,---- -+# | TODO -+# `---- -+# - Use util-vserver shell functions library, as does the Bash -+# completion script found on /usr/lib/util-vserver/functions -+# - Implement commands arguments completion. -+# -+ -+### -+### Main completion function -+### -+ -+_vserver () { -+ -+ # local variables -+ local curcontext="$curcontext" state line expl ret=1 -+ local cmd=$words[3] -+ -+ # dispatch -+ case "$cmd" in -+ apt-cache|apt-config|apt-get) -+ compset -n 3 -+ _dispatch $cmd:t $cmd $cmd:t -default- && ret=0 -+ ;; -+ exec) -+ _arguments -C \ -+ '1: :->vsnames' \ -+ '2: :->cmds' \ -+ '3:command name: _command_names -e' \ -+ '*::arguments: _normal' && ret=0 -+ ;; -+ stop|restart|condrestart|enter|running|status) -+ _arguments -C \ -+ '1: :->vsnames' \ -+ '2: :->cmds' \ -+ '*::arguments: _message "no more arguments"' && ret=0 -+ ;; -+ *) -+ _arguments -C \ -+ '(-)--help[print help information]' \ -+ '(- *)--version[print client version information]' \ -+ '1: :->vsnames' \ -+ '2: :->cmds' \ -+ '*:: :->args' && ret=0 -+ ;; -+ esac -+ -+ # cache initialization -+ if [[ -n "$state" ]]; then -+ if (( ! $+_cache_vserver_cfgdir )); then -+ typeset -g _cache_vserver_cfgdir_initialized -+ _vserver_cache_cfgdir -+ fi -+ if (( ! $+_cache_vserver_vsnames )); then -+ typeset -g _cache_vserver_vsnames_initialized -+ _vserver_cache_vsnames -+ fi -+ if (( ! $+_cache_vserver_cmds )); then -+ typeset -g _cache_vserver_cmds_initialized -+ _vserver_cache_cmds -+ fi -+ fi -+ -+ case "$state" in -+ vsnames) -+ _wanted commands expl 'vserver name' _vserver_vsnames && ret=0 -+ ;; -+ cmds) -+ _wanted commands expl 'vserver command' _vserver_commands && ret=0 -+ ;; -+ args) -+ local args -+ if $+args; then -+ _arguments "$args[@]" && ret=0 -+ else -+ ret=0 -+ fi -+ ;; -+ esac -+ -+ return ret -+} -+ -+### -+### Auxiliary completion functions -+### -+ -+(( $+functions[_vserver_commands] )) || -+_vserver_commands() { -+ compadd "$@" -k _cache_vserver_cmds || compadd "$@" ${(s.:.)_cache_vserver_cmds} -+} -+ -+(( $+functions[_vserver_vsnames] )) || -+_vserver_vsnames() { -+ local expl -+ _wanted vserver expl 'vserver name' compadd -S '' $_cache_vserver_vsnames[@] -+} -+ -+### -+### Cache functions -+### -+ -+(( $+functions[_vserver_cache_cfgdir] )) || -+_vserver_cache_cfgdir() { -+ if [[ "$_cache_vserver_cfgdir_initialized" != true ]]; then -+ typeset -ga _cache_vserver_cfgdir -+ _cache_vserver_cfgdir=`vserver-info info SYSINFO | grep '^ *cfg-Directory' | awk '{print $2}'` -+ _cache_vserver_cfgdir_initialized=true -+ fi -+} -+ -+(( $+functions[_vserver_cache_vsnames] )) || -+_vserver_cache_vsnames() { -+ if [[ "$_cache_vserver_vsnames_initialized" != true ]]; then -+ typeset -ga _cache_vserver_vsnames -+ _cache_vserver_vsnames=( $(ls -d $_cache_vserver_cfgdir/*/ | sed -e s,$_cache_vserver_cfgdir,, | tr -d '/') ) -+ _cache_vserver_vsnames_initialized=true -+ fi -+} -+ -+(( $+functions[_vserver_cache_cmds] )) || -+_vserver_cache_cmds() { -+ if [[ "$_cache_vserver_cmds_initialized" != true ]]; then -+ typeset -ga _cache_vserver_cmds -+ _cache_vserver_cmds=( -+ start -+ stop -+ restart -+ condrestart -+ suexec -+ exec -+ enter -+ chkconfig -+ running -+ status -+ build -+ unify -+ pkg -+ apt-get -+ apt-config -+ apt-cache -+ rpm -+ pkgmgmt -+ ) -+ _cache_vserver_cmds_initialized=true -+ fi -+} -+ -+### -+### Main function call -+### -+ -+_vserver "$@" -+ -+### -+### Emacs variables -+### -+ -+# Local Variables: -+# mode:sh -+# sh-basic-offset: 2 -+# End: diff --git a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-testsuite-fix.patch b/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-testsuite-fix.patch deleted file mode 100644 index a1be029..0000000 --- a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.208-testsuite-fix.patch +++ /dev/null @@ -1,33 +0,0 @@ -Origin: -http://vserver.13thfloor.at/Experimental/UTIL-VSERVER/delta-0.30.208-tsfix.diff ---- util-vserver-0.30.208/lib/testsuite/personality.c 2005-04-28 19:54:57 +0200 -+++ util-vserver-0.30.208-fix/lib/testsuite/personality.c 2005-08-11 17:51:25 +0200 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); diff --git a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r3/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r3/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r3/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index c7be942..0000000 --- a/util-vserver/patches/0.30.210-r3/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -NurpP util-vserver-0.30.209/lib/syscall-alternative.h util-vserver-0.30.209-mips/lib/syscall-alternative.h ---- util-vserver-0.30.209/lib/syscall-alternative.h 2005-10-28 18:33:50 +0200 -+++ util-vserver-0.30.209-mips/lib/syscall-alternative.h 2006-01-06 18:42:05 +0100 -@@ -1,9 +1,9 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -+ // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny8.h - - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -399,8 +399,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" - -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") -+ -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** diff --git a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-testsuite-fix.patch b/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-testsuite-fix.patch deleted file mode 100644 index a1be029..0000000 --- a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.208-testsuite-fix.patch +++ /dev/null @@ -1,33 +0,0 @@ -Origin: -http://vserver.13thfloor.at/Experimental/UTIL-VSERVER/delta-0.30.208-tsfix.diff ---- util-vserver-0.30.208/lib/testsuite/personality.c 2005-04-28 19:54:57 +0200 -+++ util-vserver-0.30.208-fix/lib/testsuite/personality.c 2005-08-11 17:51:25 +0200 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); diff --git a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r4/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r4/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r4/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index c7be942..0000000 --- a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -NurpP util-vserver-0.30.209/lib/syscall-alternative.h util-vserver-0.30.209-mips/lib/syscall-alternative.h ---- util-vserver-0.30.209/lib/syscall-alternative.h 2005-10-28 18:33:50 +0200 -+++ util-vserver-0.30.209-mips/lib/syscall-alternative.h 2006-01-06 18:42:05 +0100 -@@ -1,9 +1,9 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -+ // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny8.h - - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -399,8 +399,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" - -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") -+ -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** diff --git a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r4/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r4/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-testsuite-fix.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-testsuite-fix.patch deleted file mode 100644 index a1be029..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.208-testsuite-fix.patch +++ /dev/null @@ -1,33 +0,0 @@ -Origin: -http://vserver.13thfloor.at/Experimental/UTIL-VSERVER/delta-0.30.208-tsfix.diff ---- util-vserver-0.30.208/lib/testsuite/personality.c 2005-04-28 19:54:57 +0200 -+++ util-vserver-0.30.208-fix/lib/testsuite/personality.c 2005-08-11 17:51:25 +0200 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 93270c1..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2004-03-24 02:07:11.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-03 17:19:15.000000000 +0100 -@@ -25,7 +25,10 @@ - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ if (caps->bmask) -+ k_caps.bcaps = caps->bcaps & caps->bmask; -+ else -+ k_caps.bcaps = ~0; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-delete-cmd.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-delete-cmd.patch deleted file mode 100644 index b6f446f..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-delete-cmd.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -NurpP util-vserver-0.30.210/scripts/vserver util-vserver-0.30.210-delete/scripts/vserver ---- util-vserver-0.30.210/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210-delete/scripts/vserver 2006-03-12 08:21:19.293748750 +0100 -@@ -43,6 +43,7 @@ Possible commands are: - restart ... restarts the specified vserver; this is the subsequent - execution of a synchronized 'stop' and a 'start' - condrestart ... restarts the vserver when it is running already -+ delete ... deletes the specified vserver - suexec <user> <shell-command> <args*> - ... executes a command as the specified user in the vserver - exec <shell-command> <args*> -@@ -96,6 +97,17 @@ the GNU General Public License. This pr - exit 0 - } - -+function delete() -+{ -+ if [[ -z "$OPTION_SILENT" ]]; then -+ read -p "Really remove '$vserver'? [y/N]" deleteok -+ [[ "$deleteok" != [Yy] ]] && exit 2 -+ fi -+ -+ isVserverRunning "$VSERVER_DIR" && "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ rm -rf $(readlink -f "$VSERVER_DIR"/vdir) "$VSERVER_DIR" -+} -+ - function suexec() - { - . $__PKGLIBDIR/vserver.suexec -@@ -203,7 +215,7 @@ case "$2" in - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -- (suexec|restart) -+ (suexec|restart|delete) - shift 2 - $cmd "$@" - ;; diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index c7be942..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -NurpP util-vserver-0.30.209/lib/syscall-alternative.h util-vserver-0.30.209-mips/lib/syscall-alternative.h ---- util-vserver-0.30.209/lib/syscall-alternative.h 2005-10-28 18:33:50 +0200 -+++ util-vserver-0.30.209-mips/lib/syscall-alternative.h 2006-01-06 18:42:05 +0100 -@@ -1,9 +1,9 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -+ // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny8.h - - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -399,8 +399,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" - -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") -+ -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-vcontext-uid.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-vcontext-uid.patch deleted file mode 100644 index d552f49..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-vcontext-uid.patch +++ /dev/null @@ -1,131 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc util-vserver-0.30.210.uid/ensc_wrappers/wrappers-unistd.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-unistd.hc 2006-01-21 18:55:36.000000000 +0100 -+++ util-vserver-0.30.210.uid/ensc_wrappers/wrappers-unistd.hc 2006-03-11 13:13:10.000000000 +0100 -@@ -156,6 +156,12 @@ Esetgroups(size_t size, const gid_t *lis - { - FatalErrnoError(setgroups(size, list)==-1, "setgroups()"); - } -+ -+inline static void -+Einitgroups(const char *user, gid_t group) -+{ -+ FatalErrnoError(initgroups(user, group)==-1, "initgroups()"); -+} - #endif - - inline static WRAPPER_DECL int -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver util-vserver-0.30.210.uid/scripts/vserver ---- util-vserver-0.30.210.orig/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210.uid/scripts/vserver 2006-03-08 23:11:28.000000000 +0100 -@@ -212,7 +212,7 @@ case "$2" in - ;; - (exec) - shift 2 -- suexec root "$@" -+ suexec 0 "$@" - ;; - (chkconfig) - shift 2 -@@ -220,7 +220,7 @@ case "$2" in - ;; - (enter) - getEnterShell "$VSERVER_DIR" -- suexec root "${ENTER_SHELL[@]}" -+ suexec 0 "${ENTER_SHELL[@]}" - ;; - (running) - isVserverRunning "$VSERVER_DIR" -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210.uid/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210.uid/src/vcontext.c 2006-03-11 13:13:59.000000000 +0100 -@@ -1,6 +1,6 @@ - // $Id: vcontext.c,v 1.18 2005/04/28 18:08:12 ensc Exp $ --*- c -*-- - --// Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Copyright (C) 2004-2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> - // - // 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 -@@ -33,6 +33,9 @@ - #include <sys/un.h> - #include <assert.h> - #include <signal.h> -+#include <sys/types.h> -+#include <pwd.h> -+#include <grp.h> - - #include <linux/personality.h> - -@@ -104,7 +107,7 @@ struct Arguments { - uint_least32_t personality_type; - int verbosity; - bool do_chroot; -- uid_t uid; -+ char const * uid; - xid_t xid; - char const * sync_sock; - char const * sync_msg; -@@ -159,7 +162,7 @@ showVersion() - WRITE_MSG(1, - "vcontext " VERSION " -- manages the creation of security contexts\n" - "This program is part of " PACKAGE_STRING "\n\n" -- "Copyright (C) 2004 Enrico Scholz\n" -+ "Copyright (C) 2004-2006 Enrico Scholz\n" - VERSION_COPYRIGHT_DISCLAIMER); - exit(0); - } -@@ -275,9 +278,33 @@ doit(struct Arguments const *args, char - if (args->do_migrate && !args->do_migrateself) - Evc_ctx_migrate(xid); - -- if (args->uid!=(uid_t)(-1) && getuid()!=args->uid) { -- Esetuid(args->uid); -- if (getuid()!=args->uid) { -+ if (args->uid != NULL) { -+ uid_t uid = 0; -+ unsigned long tmp; -+ -+ if (!isNumberUnsigned(args->uid, &tmp, false)) { -+#ifdef __dietlibc__ -+ struct passwd *pw; -+ pw = getpwnam(args->uid); -+ if (pw == NULL) { -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Username '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' does not exist\n"); -+ } -+ uid = pw->pw_uid; -+ Einitgroups(args->uid, pw->pw_gid); -+ Esetgid(pw->pw_gid); -+#else -+ WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Uid '"); -+ WRITE_STR(2, args->uid); -+ WRITE_MSG(2, "' is not a number\n"); -+#endif -+ } -+ else -+ uid = (uid_t) tmp; -+ -+ Esetuid((uid_t) uid); -+ if (getuid()!=uid) { - WRITE_MSG(2, ENSC_WRAPPERS_PREFIX "Something went wrong while changing the UID\n"); - exit(wrapper_exit_code); - } -@@ -345,7 +372,7 @@ int main (int argc, char *argv[]) - .is_silentexist = false, - .set_namespace = false, - .verbosity = 1, -- .uid = -1, -+ .uid = NULL, - .xid = VC_DYNAMIC_XID, - .personality_type = VC_BAD_PERSONALITY, - .personality_flags = 0, -@@ -369,7 +396,7 @@ int main (int argc, char *argv[]) - case CMD_SILENTEXIST : args.is_silentexist = true; break; - case CMD_SYNCSOCK : args.sync_sock = optarg; break; - case CMD_SYNCMSG : args.sync_msg = optarg; break; -- case CMD_UID : args.uid = atol(optarg); break; -+ case CMD_UID : args.uid = optarg; break; - case CMD_XID : args.xid = Evc_xidopt2xid(optarg,true); break; - case CMD_SILENT : --args.verbosity; break; - case CMD_PERSTYPE : diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index 00d070d..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,442 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers.h 2006-03-12 00:02:35.000000000 +0100 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers-termios.hc 2006-03-12 00:39:25.000000000 +0100 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.vlogin/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/scripts/vserver.functions 2006-03-12 00:17:13.000000000 +0100 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -Nurp util-vserver-0.30.210.orig/src/Makefile-files util-vserver-0.30.210.vlogin/src/Makefile-files ---- util-vserver-0.30.210.orig/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/src/Makefile-files 2006-03-08 18:25:04.000000000 +0100 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210.vlogin/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210.vlogin/src/vcontext.c 2006-03-12 00:34:42.000000000 +0100 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(char *argv[]); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argv+optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -diff -Nurp util-vserver-0.30.210.orig/src/vlogin.c util-vserver-0.30.210.vlogin/src/vlogin.c ---- util-vserver-0.30.210.orig/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/src/vlogin.c 2006-03-12 00:36:13.000000000 +0100 -@@ -0,0 +1,286 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* echo off -+ ** canonical mode off -+ ** extended input processing off -+ ** signal chars off */ -+ buf.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); -+ -+ /* no SIGINT on BREAK -+ ** CR-to-NL off -+ ** input parity check off -+ ** don't strip 8th bit on input -+ ** output flow control off */ -+ buf.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); -+ -+ /* clear size bits -+ ** parity checking off */ -+ buf.c_cflag &= ~(CSIZE | PARENB); -+ -+ /* set 8 bits/char */ -+ buf.c_cflag |= CS8; -+ -+ /* output processing off */ -+ buf.c_oflag &= ~(OPOST); -+ -+ /* 1 byte at a time -+ ** no timer */ -+ buf.c_cc[VMIN] = 1; -+ buf.c_cc[VTIME] = 0; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* exit handler */ -+static void -+terminal_atexit(void) -+{ -+ terminal_reset(); -+ WRITE_MSG(1, "\n"); /* for cosmetic reasons */ -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activity to user */ -+static void -+terminal_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(t.fd, buf, sizeof(buf)); -+ -+ /* get the current terminal settings */ -+ Etcgetattr(t.fd, &t.term); -+ -+ /* set the current terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSANOW, &t.term); -+ -+ /* write activity to user */ -+ EwriteAll(STDOUT_FILENO, buf, len); -+} -+ -+/* copy user activity to terminal */ -+static void -+user_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ len = Eread(STDIN_FILENO, buf, sizeof(buf)); -+ EwriteAll(t.fd, buf, len); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ wait(&status); -+ exit(status); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(char *argv[]) -+{ -+ int slave; -+ pid_t pid; -+ int n; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[0], argv); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ pid = Efork(); -+ -+ /* setup some signal handlers */ -+ signal(SIGINT, signal_handler); -+ signal(SIGCHLD, signal_handler); -+ signal(SIGWINCH, signal_handler); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[0], argv); -+ } -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* we want a redraw */ -+ atexit(terminal_atexit); -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ Eselect(n + 1, &rfds, NULL, NULL, NULL); -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ user_activity(); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_activity(); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r5/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 93270c1..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2004-03-24 02:07:11.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-03 17:19:15.000000000 +0100 -@@ -25,7 +25,10 @@ - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ if (caps->bmask) -+ k_caps.bcaps = caps->bcaps & caps->bmask; -+ else -+ k_caps.bcaps = ~0; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-delete-cmd.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-delete-cmd.patch deleted file mode 100644 index b6f446f..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-delete-cmd.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -NurpP util-vserver-0.30.210/scripts/vserver util-vserver-0.30.210-delete/scripts/vserver ---- util-vserver-0.30.210/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210-delete/scripts/vserver 2006-03-12 08:21:19.293748750 +0100 -@@ -43,6 +43,7 @@ Possible commands are: - restart ... restarts the specified vserver; this is the subsequent - execution of a synchronized 'stop' and a 'start' - condrestart ... restarts the vserver when it is running already -+ delete ... deletes the specified vserver - suexec <user> <shell-command> <args*> - ... executes a command as the specified user in the vserver - exec <shell-command> <args*> -@@ -96,6 +97,17 @@ the GNU General Public License. This pr - exit 0 - } - -+function delete() -+{ -+ if [[ -z "$OPTION_SILENT" ]]; then -+ read -p "Really remove '$vserver'? [y/N]" deleteok -+ [[ "$deleteok" != [Yy] ]] && exit 2 -+ fi -+ -+ isVserverRunning "$VSERVER_DIR" && "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ rm -rf $(readlink -f "$VSERVER_DIR"/vdir) "$VSERVER_DIR" -+} -+ - function suexec() - { - . $__PKGLIBDIR/vserver.suexec -@@ -203,7 +215,7 @@ case "$2" in - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -- (suexec|restart) -+ (suexec|restart|delete) - shift 2 - $cmd "$@" - ;; diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index c7be942..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -NurpP util-vserver-0.30.209/lib/syscall-alternative.h util-vserver-0.30.209-mips/lib/syscall-alternative.h ---- util-vserver-0.30.209/lib/syscall-alternative.h 2005-10-28 18:33:50 +0200 -+++ util-vserver-0.30.209-mips/lib/syscall-alternative.h 2006-01-06 18:42:05 +0100 -@@ -1,9 +1,9 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -+ // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny8.h - - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -399,8 +399,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" - -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") -+ -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index b3b5acf..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,448 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h util-vserver-0.30.210/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h 2006-03-15 12:39:49.000000000 +0100 -+++ util-vserver-0.30.210/ensc_wrappers/wrappers.h 2006-03-13 22:32:33.000000000 +0100 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc 2006-03-13 22:32:33.000000000 +0100 -@@ -0,0 +1,32 @@ -+// $Id: util-vserver-0.30.210-vlogin.patch,v 1.1 2006/03/12 00:01:57 dhozac Exp $ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-03-15 12:39:49.000000000 +0100 -+++ util-vserver-0.30.210/scripts/vserver.functions 2006-03-13 22:32:33.000000000 +0100 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -Nurp util-vserver-0.30.210.orig/src/Makefile-files util-vserver-0.30.210/src/Makefile-files ---- util-vserver-0.30.210.orig/src/Makefile-files 2006-03-15 12:39:49.000000000 +0100 -+++ util-vserver-0.30.210/src/Makefile-files 2006-03-13 22:32:33.000000000 +0100 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2006-03-15 12:39:49.000000000 +0100 -+++ util-vserver-0.30.210/src/vcontext.c 2006-03-13 22:32:33.000000000 +0100 -@@ -65,6 +65,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -88,6 +89,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -103,6 +105,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -115,6 +118,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(char *argv[]); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -148,6 +153,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -314,12 +320,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argv+optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -368,6 +377,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -390,6 +400,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -diff -Nurp util-vserver-0.30.210.orig/src/vlogin.c util-vserver-0.30.210/src/vlogin.c ---- util-vserver-0.30.210.orig/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210/src/vlogin.c 2006-03-15 13:04:34.000000000 +0100 -@@ -0,0 +1,292 @@ -+// $Id: util-vserver-0.30.210-vlogin.patch,v 1.1 2006/03/12 00:01:57 dhozac Exp $ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* echo off -+ ** canonical mode off -+ ** extended input processing off -+ ** signal chars off */ -+ buf.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); -+ -+ /* no SIGINT on BREAK -+ ** CR-to-NL off -+ ** input parity check off -+ ** don't strip 8th bit on input -+ ** output flow control off */ -+ buf.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); -+ -+ /* clear size bits -+ ** parity checking off */ -+ buf.c_cflag &= ~(CSIZE | PARENB); -+ -+ /* set 8 bits/char */ -+ buf.c_cflag |= CS8; -+ -+ /* output processing off */ -+ buf.c_oflag &= ~(OPOST); -+ -+ /* 1 byte at a time -+ ** no timer */ -+ buf.c_cc[VMIN] = 1; -+ buf.c_cc[VTIME] = 0; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* exit handler */ -+static void -+terminal_atexit(void) -+{ -+ terminal_reset(); -+ WRITE_MSG(1, "\n"); /* for cosmetic reasons */ -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activity to user */ -+static void -+terminal_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(t.fd, buf, sizeof(buf)); -+ -+ /* get the current terminal settings */ -+ Etcgetattr(t.fd, &t.term); -+ -+ /* set the current terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSANOW, &t.term); -+ -+ /* write activity to user */ -+ EwriteAll(STDOUT_FILENO, buf, len); -+} -+ -+/* copy user activity to terminal */ -+static void -+user_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ len = Eread(STDIN_FILENO, buf, sizeof(buf)); -+ EwriteAll(t.fd, buf, len); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ wait(&status); -+ exit(status); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(char *argv[]) -+{ -+ int slave; -+ pid_t pid; -+ int n; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[0], argv); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ pid = Efork(); -+ -+ /* setup some signal handlers */ -+ signal(SIGINT, signal_handler); -+ signal(SIGCHLD, signal_handler); -+ signal(SIGWINCH, signal_handler); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[0], argv); -+ } -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* we want a redraw */ -+ atexit(terminal_atexit); -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ user_activity(); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_activity(); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r6/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 93270c1..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2004-03-24 02:07:11.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-03 17:19:15.000000000 +0100 -@@ -25,7 +25,10 @@ - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ if (caps->bmask) -+ k_caps.bcaps = caps->bcaps & caps->bmask; -+ else -+ k_caps.bcaps = ~0; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-delete-cmd.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-delete-cmd.patch deleted file mode 100644 index b6f446f..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-delete-cmd.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -NurpP util-vserver-0.30.210/scripts/vserver util-vserver-0.30.210-delete/scripts/vserver ---- util-vserver-0.30.210/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210-delete/scripts/vserver 2006-03-12 08:21:19.293748750 +0100 -@@ -43,6 +43,7 @@ Possible commands are: - restart ... restarts the specified vserver; this is the subsequent - execution of a synchronized 'stop' and a 'start' - condrestart ... restarts the vserver when it is running already -+ delete ... deletes the specified vserver - suexec <user> <shell-command> <args*> - ... executes a command as the specified user in the vserver - exec <shell-command> <args*> -@@ -96,6 +97,17 @@ the GNU General Public License. This pr - exit 0 - } - -+function delete() -+{ -+ if [[ -z "$OPTION_SILENT" ]]; then -+ read -p "Really remove '$vserver'? [y/N]" deleteok -+ [[ "$deleteok" != [Yy] ]] && exit 2 -+ fi -+ -+ isVserverRunning "$VSERVER_DIR" && "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ rm -rf $(readlink -f "$VSERVER_DIR"/vdir) "$VSERVER_DIR" -+} -+ - function suexec() - { - . $__PKGLIBDIR/vserver.suexec -@@ -203,7 +215,7 @@ case "$2" in - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -- (suexec|restart) -+ (suexec|restart|delete) - shift 2 - $cmd "$@" - ;; diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index b3b5acf..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,448 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h util-vserver-0.30.210/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h 2006-03-15 12:39:49.000000000 +0100 -+++ util-vserver-0.30.210/ensc_wrappers/wrappers.h 2006-03-13 22:32:33.000000000 +0100 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210/ensc_wrappers/wrappers-termios.hc 2006-03-13 22:32:33.000000000 +0100 -@@ -0,0 +1,32 @@ -+// $Id: util-vserver-0.30.210-vlogin.patch,v 1.1 2006/03/12 00:01:57 dhozac Exp $ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-03-15 12:39:49.000000000 +0100 -+++ util-vserver-0.30.210/scripts/vserver.functions 2006-03-13 22:32:33.000000000 +0100 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -Nurp util-vserver-0.30.210.orig/src/Makefile-files util-vserver-0.30.210/src/Makefile-files ---- util-vserver-0.30.210.orig/src/Makefile-files 2006-03-15 12:39:49.000000000 +0100 -+++ util-vserver-0.30.210/src/Makefile-files 2006-03-13 22:32:33.000000000 +0100 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2006-03-15 12:39:49.000000000 +0100 -+++ util-vserver-0.30.210/src/vcontext.c 2006-03-13 22:32:33.000000000 +0100 -@@ -65,6 +65,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -88,6 +89,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -103,6 +105,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -115,6 +118,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(char *argv[]); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -148,6 +153,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -314,12 +320,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argv+optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -368,6 +377,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -390,6 +400,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -diff -Nurp util-vserver-0.30.210.orig/src/vlogin.c util-vserver-0.30.210/src/vlogin.c ---- util-vserver-0.30.210.orig/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210/src/vlogin.c 2006-03-15 13:04:34.000000000 +0100 -@@ -0,0 +1,292 @@ -+// $Id: util-vserver-0.30.210-vlogin.patch,v 1.1 2006/03/12 00:01:57 dhozac Exp $ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* echo off -+ ** canonical mode off -+ ** extended input processing off -+ ** signal chars off */ -+ buf.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); -+ -+ /* no SIGINT on BREAK -+ ** CR-to-NL off -+ ** input parity check off -+ ** don't strip 8th bit on input -+ ** output flow control off */ -+ buf.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); -+ -+ /* clear size bits -+ ** parity checking off */ -+ buf.c_cflag &= ~(CSIZE | PARENB); -+ -+ /* set 8 bits/char */ -+ buf.c_cflag |= CS8; -+ -+ /* output processing off */ -+ buf.c_oflag &= ~(OPOST); -+ -+ /* 1 byte at a time -+ ** no timer */ -+ buf.c_cc[VMIN] = 1; -+ buf.c_cc[VTIME] = 0; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* exit handler */ -+static void -+terminal_atexit(void) -+{ -+ terminal_reset(); -+ WRITE_MSG(1, "\n"); /* for cosmetic reasons */ -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activity to user */ -+static void -+terminal_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(t.fd, buf, sizeof(buf)); -+ -+ /* get the current terminal settings */ -+ Etcgetattr(t.fd, &t.term); -+ -+ /* set the current terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSANOW, &t.term); -+ -+ /* write activity to user */ -+ EwriteAll(STDOUT_FILENO, buf, len); -+} -+ -+/* copy user activity to terminal */ -+static void -+user_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ len = Eread(STDIN_FILENO, buf, sizeof(buf)); -+ EwriteAll(t.fd, buf, len); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ wait(&status); -+ exit(status); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(char *argv[]) -+{ -+ int slave; -+ pid_t pid; -+ int n; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[0], argv); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ pid = Efork(); -+ -+ /* setup some signal handlers */ -+ signal(SIGINT, signal_handler); -+ signal(SIGCHLD, signal_handler); -+ signal(SIGWINCH, signal_handler); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[0], argv); -+ } -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* we want a redraw */ -+ atexit(terminal_atexit); -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ user_activity(); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_activity(); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r7/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 93270c1..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2004-03-24 02:07:11.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-03 17:19:15.000000000 +0100 -@@ -25,7 +25,10 @@ - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ if (caps->bmask) -+ k_caps.bcaps = caps->bcaps & caps->bmask; -+ else -+ k_caps.bcaps = ~0; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-delete-cmd.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-delete-cmd.patch deleted file mode 100644 index b6f446f..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-delete-cmd.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -NurpP util-vserver-0.30.210/scripts/vserver util-vserver-0.30.210-delete/scripts/vserver ---- util-vserver-0.30.210/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210-delete/scripts/vserver 2006-03-12 08:21:19.293748750 +0100 -@@ -43,6 +43,7 @@ Possible commands are: - restart ... restarts the specified vserver; this is the subsequent - execution of a synchronized 'stop' and a 'start' - condrestart ... restarts the vserver when it is running already -+ delete ... deletes the specified vserver - suexec <user> <shell-command> <args*> - ... executes a command as the specified user in the vserver - exec <shell-command> <args*> -@@ -96,6 +97,17 @@ the GNU General Public License. This pr - exit 0 - } - -+function delete() -+{ -+ if [[ -z "$OPTION_SILENT" ]]; then -+ read -p "Really remove '$vserver'? [y/N]" deleteok -+ [[ "$deleteok" != [Yy] ]] && exit 2 -+ fi -+ -+ isVserverRunning "$VSERVER_DIR" && "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ rm -rf $(readlink -f "$VSERVER_DIR"/vdir) "$VSERVER_DIR" -+} -+ - function suexec() - { - . $__PKGLIBDIR/vserver.suexec -@@ -203,7 +215,7 @@ case "$2" in - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -- (suexec|restart) -+ (suexec|restart|delete) - shift 2 - $cmd "$@" - ;; diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index ec3c86f..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,520 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers.h 2006-04-04 04:18:38.000000000 +0200 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers-termios.hc 2006-04-04 04:18:38.000000000 +0200 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -Nurp util-vserver-0.30.210.orig/Makefile.in util-vserver-0.30.210.vlogin/Makefile.in ---- util-vserver-0.30.210.orig/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/Makefile.in 2006-04-04 05:00:11.000000000 +0200 -@@ -965,7 +965,7 @@ src_testsuite_vunify_functest_DEPENDENCI - am_src_vattribute_OBJECTS = src/vattribute.$(OBJEXT) - src_vattribute_OBJECTS = $(am_src_vattribute_OBJECTS) - src_vattribute_DEPENDENCIES = $(am__DEPENDENCIES_11) --am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) -+am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) src/vlogin.$(OBJEXT) - src_vcontext_OBJECTS = $(am_src_vcontext_OBJECTS) - src_vcontext_DEPENDENCIES = $(am__DEPENDENCIES_11) \ - $(am__DEPENDENCIES_9) -@@ -1746,7 +1746,7 @@ src_chbind_LDFLAGS = $(VSERVER_LDFLGS) - src_chcontext_compat_SOURCES = src/chcontext.c - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - src_vsched_SOURCES = src/vsched.c -@@ -3489,6 +3489,8 @@ src/vattribute$(EXEEXT): $(src_vattribut - $(LINK) $(src_vattribute_LDFLAGS) $(src_vattribute_OBJECTS) $(src_vattribute_LDADD) $(LIBS) - src/vcontext.$(OBJEXT): src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -+src/vlogin.$(OBJEXT): src/$(am__dirstamp) \ -+ src/$(DEPDIR)/$(am__dirstamp) - src/vcontext$(EXEEXT): $(src_vcontext_OBJECTS) $(src_vcontext_DEPENDENCIES) src/$(am__dirstamp) - @rm -f src/vcontext$(EXEEXT) - $(LINK) $(src_vcontext_LDFLAGS) $(src_vcontext_OBJECTS) $(src_vcontext_LDADD) $(LIBS) -@@ -4222,6 +4224,7 @@ mostlyclean-compile: - -rm -f src/vdu.$(OBJEXT) - -rm -f src/vhashify.$(OBJEXT) - -rm -f src/vlimit.$(OBJEXT) -+ -rm -f src/vlogin.$(OBJEXT) - -rm -f src/vnamespace.$(OBJEXT) - -rm -f src/vps.$(OBJEXT) - -rm -f src/vreboot.$(OBJEXT) -@@ -4593,6 +4596,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdu.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vhashify.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlimit.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlogin.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vnamespace.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vps.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vreboot.Po@am__quote@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.vlogin/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/scripts/vserver.functions 2006-04-04 04:18:38.000000000 +0200 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -Nurp util-vserver-0.30.210.orig/src/Makefile-files util-vserver-0.30.210.vlogin/src/Makefile-files ---- util-vserver-0.30.210.orig/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/src/Makefile-files 2006-04-04 04:18:38.000000000 +0200 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210.vlogin/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210.vlogin/src/vcontext.c 2006-04-04 04:18:38.000000000 +0200 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(char *argv[]); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argv+optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -diff -Nurp util-vserver-0.30.210.orig/src/vlogin.c util-vserver-0.30.210.vlogin/src/vlogin.c ---- util-vserver-0.30.210.orig/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/src/vlogin.c 2006-04-04 06:48:12.000000000 +0200 -@@ -0,0 +1,318 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* echo off -+ ** canonical mode off -+ ** extended input processing off -+ ** signal chars off */ -+ buf.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); -+ -+ /* no SIGINT on BREAK -+ ** CR-to-NL off -+ ** input parity check off -+ ** don't strip 8th bit on input -+ ** output flow control off */ -+ buf.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); -+ -+ /* clear size bits -+ ** parity checking off */ -+ buf.c_cflag &= ~(CSIZE | PARENB); -+ -+ /* set 8 bits/char */ -+ buf.c_cflag |= CS8; -+ -+ /* output processing off */ -+ buf.c_oflag &= ~(OPOST); -+ -+ /* 1 byte at a time -+ ** no timer */ -+ buf.c_cc[VMIN] = 1; -+ buf.c_cc[VTIME] = 0; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* exit handler */ -+static void -+terminal_atexit(void) -+{ -+ terminal_reset(); -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activity to user */ -+static void -+terminal_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(t.fd, buf, sizeof(buf)); -+ -+ /* get the current terminal settings */ -+ Etcgetattr(t.fd, &t.term); -+ -+ /* set the current terminal settings */ -+ Etcsetattr(STDIN_FILENO, TCSANOW, &t.term); -+ -+ /* write activity to user */ -+ EwriteAll(STDOUT_FILENO, buf, len); -+} -+ -+/* copy user activity to terminal */ -+static void -+user_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ len = Eread(STDIN_FILENO, buf, sizeof(buf)); -+ EwriteAll(t.fd, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(char *argv[]) -+{ -+ int slave; -+ pid_t pid; -+ int n; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[0], argv); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[0], argv); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* we want a redraw */ -+ atexit(terminal_atexit); -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ user_activity(); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_activity(); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r8/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-fix-fastboot.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-fix-fastboot.patch deleted file mode 100644 index 7bf246d..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-fix-fastboot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nrup util-vserver-0.30.208.orig/scripts/vserver.functions util-vserver-0.30.208/scripts/vserver.functions ---- util-vserver-0.30.208.orig/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208/scripts/vserver.functions 2005-08-03 11:59:32.000000000 +0200 -@@ -627,8 +627,7 @@ function prepareInit - find var/lock ! -type d -print0; } | xargs -0r $_CHROOT_SH rm - ;; - plain) -- $_CHROOT_SH rm .autofsck forcefsck 2>/dev/null || : -- : | $_CHROOT_SH truncate fastboot 2>/dev/null || : -+ $_CHROOT_SH rm .autofsck forcefsck fastboot 2> /dev/null || : - ;; - minit) - ;; diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-nicefix.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-nicefix.patch deleted file mode 100644 index 8b489f0..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-nicefix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -NurpP util-vserver-0.30.208/scripts/legacy/vserver util-vserver-0.30.208-nicefix/scripts/legacy/vserver ---- util-vserver-0.30.208/scripts/legacy/vserver 2005-03-21 21:03:31.000000000 +0100 -+++ util-vserver-0.30.208-nicefix/scripts/legacy/vserver 2005-10-27 13:33:37.384017250 +0200 -@@ -514,7 +514,7 @@ elif [ "$2" = "start" ] ; then - DOMAINOPT="--domainname $S_DOMAINNAME" - fi - if [ "$S_NICE" != "" ] ; then -- NICECMD="nice -$S_NICE" -+ NICECMD="nice -n $S_NICE" - fi - mkdir -p $__PKGSTATEDIR - chmod 700 $__PKGSTATEDIR -diff -NurpP util-vserver-0.30.208/scripts/vserver.functions util-vserver-0.30.208-nicefix/scripts/vserver.functions ---- util-vserver-0.30.208/scripts/vserver.functions 2005-07-03 19:47:06.000000000 +0200 -+++ util-vserver-0.30.208-nicefix/scripts/vserver.functions 2005-10-27 13:32:33.332014250 +0200 -@@ -100,7 +100,7 @@ function _generateNiceCommand - test -r "$vdir/nice" || return 0; - read nice <"$vdir"/nice - -- NICE_CMD=( $_NICE -$nice ) -+ NICE_CMD=( $_NICE -n $nice ) - } - - diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-rkill.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-rkill.patch deleted file mode 100644 index 058e404..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-rkill.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -NurpP util-vserver-0.30.208/lib/cflags-v13.c util-vserver-0.30.208-rkill/lib/cflags-v13.c ---- util-vserver-0.30.208/lib/cflags-v13.c 2004-10-21 21:00:20.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/cflags-v13.c 2005-09-30 14:32:27.575320000 +0200 -@@ -54,6 +54,9 @@ static struct Mapping_uint64 const VALUE - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), - -+ DECL("sc_helper", VC_VXF_SC_HELPER), -+ DECL("reboot_kill", VC_VXF_REBOOT_KILL), -+ - DECL("fork_rss", VC_VXF_FORK_RSS), - DECL("prolific", VC_VXF_PROLIFIC), - DECL("igneg_nice", VC_VXF_IGNEG_NICE), -diff -NurpP util-vserver-0.30.208/lib/vserver.h util-vserver-0.30.208-rkill/lib/vserver.h ---- util-vserver-0.30.208/lib/vserver.h 2005-07-15 18:27:02.000000000 +0200 -+++ util-vserver-0.30.208-rkill/lib/vserver.h 2005-09-30 14:33:08.485876750 +0200 -@@ -181,6 +181,9 @@ - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) - -+#define VC_VXF_SC_HELPER (1ULL<<36) -+#define VC_VXF_REBOOT_KILL (1ULL<<37) -+ - #define VC_VXF_FORK_RSS (1ULL<<48) - #define VC_VXF_PROLIFIC (1ULL<<49) - diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-sharedportage.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-sharedportage.patch deleted file mode 100644 index 051e7f5..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.208-sharedportage.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -NurpP util-vserver-0.30.208/distrib/misc/fstab util-vserver-0.30.208-sharedportage/distrib/misc/fstab ---- util-vserver-0.30.208/distrib/misc/fstab 2005-02-19 19:12:34.000000000 +0100 -+++ util-vserver-0.30.208-sharedportage/distrib/misc/fstab 2005-09-30 14:39:41.790456750 +0200 -@@ -1,3 +1,7 @@ - none /proc proc defaults 0 0 - none /tmp tmpfs size=16m,mode=1777 0 0 - none /dev/pts devpts gid=5,mode=620 0 0 -+ -+# shared portage tree -+#/usr/portage /usr/portage none bind,ro 0 0 -+#/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.209-remove-traditional-syscall.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.209-remove-traditional-syscall.patch deleted file mode 100644 index fdb676a..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.209-remove-traditional-syscall.patch +++ /dev/null @@ -1,29 +0,0 @@ -Index: util-vserver-0.30.209/config.h.in -=================================================================== ---- util-vserver-0.30.209.orig/config.h.in -+++ util-vserver-0.30.209/config.h.in -@@ -232,10 +232,4 @@ - /* Use 64bit interface for filesystem operations */ - #undef _FILE_OFFSET_BITS - -- --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif -- - #include "compat.h" -- -Index: util-vserver-0.30.209/m4/ensc_syscall.m4 -=================================================================== ---- util-vserver-0.30.209.orig/m4/ensc_syscall.m4 -+++ util-vserver-0.30.209/m4/ensc_syscall.m4 -@@ -101,9 +101,4 @@ int main() { - if test x"$with_syscall" = xtraditional; then - AC_DEFINE(ENSC_SYSCALL_TRADITIONAL, 1, [Define to 1 when the fast syscall(2) invocation does not work]) - fi -- -- AH_BOTTOM([ --#if defined(__pic__) && defined(__i386) && !defined(ENSC_SYSCALL_TRADITIONAL) && !defined(ENSC_USE_ALTERNATIVE_SYSCALL_MACROS) --# define ENSC_SYSCALL_TRADITIONAL 1 --#endif]) - ]) diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-bmask.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-bmask.patch deleted file mode 100644 index 93270c1..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-bmask.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/lib/syscall_setccaps-v13.hc 2004-03-24 02:07:11.000000000 +0100 -+++ util-vserver-0.30.210/lib/syscall_setccaps-v13.hc 2006-03-03 17:19:15.000000000 +0100 -@@ -25,7 +25,10 @@ - { - struct vcmd_ctx_caps_v0 k_caps; - -- k_caps.bcaps = caps->bcaps & caps->bmask; -+ if (caps->bmask) -+ k_caps.bcaps = caps->bcaps & caps->bmask; -+ else -+ k_caps.bcaps = ~0; - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-chcontext-secure.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-chcontext-secure.patch deleted file mode 100644 index 2b91fc2..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-chcontext-secure.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- util-vserver-0.30.210.orig/scripts/chcontext 2005-04-08 21:14:47.000000000 +0200 -+++ util-vserver-0.30.210/scripts/chcontext 2006-03-25 05:17:00.000000000 +0100 -@@ -153,9 +153,9 @@ - chain_cmd=( "${chain_cmd[@]}" - -- - $_VATTRIBUTE --set -+ ${OPT_SECURE:+--secure} - ${OPT_CAPS:+--bcap "${OPT_CAPS[*]}"} -- ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} -- ${OPT_SECURE:+--secure} ) -+ ${OPT_FLAGS:+--flag "${OPT_FLAGS[*]}"} ) - - migrate_cmd=( $_VCONTEXT - ${OPT_SILENT:+--silent} diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-delete-cmd.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-delete-cmd.patch deleted file mode 100644 index b6f446f..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-delete-cmd.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -NurpP util-vserver-0.30.210/scripts/vserver util-vserver-0.30.210-delete/scripts/vserver ---- util-vserver-0.30.210/scripts/vserver 2005-10-28 20:29:00.000000000 +0200 -+++ util-vserver-0.30.210-delete/scripts/vserver 2006-03-12 08:21:19.293748750 +0100 -@@ -43,6 +43,7 @@ Possible commands are: - restart ... restarts the specified vserver; this is the subsequent - execution of a synchronized 'stop' and a 'start' - condrestart ... restarts the vserver when it is running already -+ delete ... deletes the specified vserver - suexec <user> <shell-command> <args*> - ... executes a command as the specified user in the vserver - exec <shell-command> <args*> -@@ -96,6 +97,17 @@ the GNU General Public License. This pr - exit 0 - } - -+function delete() -+{ -+ if [[ -z "$OPTION_SILENT" ]]; then -+ read -p "Really remove '$vserver'? [y/N]" deleteok -+ [[ "$deleteok" != [Yy] ]] && exit 2 -+ fi -+ -+ isVserverRunning "$VSERVER_DIR" && "${SELF[@]}" $OPTION_SILENT --sync "$vserver" stop -+ rm -rf $(readlink -f "$VSERVER_DIR"/vdir) "$VSERVER_DIR" -+} -+ - function suexec() - { - . $__PKGLIBDIR/vserver.suexec -@@ -203,7 +215,7 @@ case "$2" in - shift 2 - . $__PKGLIBDIR/vserver.$cmd - ;; -- (suexec|restart) -+ (suexec|restart|delete) - shift 2 - $cmd "$@" - ;; diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-gentoo-tools.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-gentoo-tools.patch deleted file mode 100644 index a415d0a..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver-0.30.210/scripts/Makefile-files -=================================================================== ---- util-vserver-0.30.210.orig/scripts/Makefile-files -+++ util-vserver-0.30.210/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ - scripts/vserver-build.debootstrap \ -@@ -68,6 +69,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -85,7 +87,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver-0.30.210.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver-0.30.210/scripts/util-vserver-vars.pathsubst -@@ -43,6 +43,7 @@ _IFSPEC="$__LEGACYDIR/ifspec" - _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -68,6 +69,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -81,7 +85,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -92,6 +98,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-remove-init-style-gentoo.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-remove-init-style-gentoo.patch deleted file mode 100644 index 7fabe46..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-remove-init-style-gentoo.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: util-vserver-0.30.210/scripts/vserver.functions -=================================================================== ---- util-vserver-0.30.210.orig/scripts/vserver.functions -+++ util-vserver-0.30.210/scripts/vserver.functions -@@ -292,9 +292,7 @@ function _generateInitOptions - ;; - - (xgentoo) -- INITCMD_START=( /sbin/rc default ) -- INITCMD_STOP=( /sbin/rc shutdown ) -- ;; -+ panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; - - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-syscall-update.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-syscall-update.patch deleted file mode 100644 index 47d07b8..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-syscall-update.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/syscall-alternative.h util-vserver-0.30.210-shiny10/lib/syscall-alternative.h ---- util-vserver-0.30.210/lib/syscall-alternative.h 2005-10-28 18:33:50.000000000 +0200 -+++ util-vserver-0.30.210-shiny10/lib/syscall-alternative.h 2006-04-02 21:07:52.000000000 +0200 -@@ -1,9 +1,7 @@ -- // from http://vserver.13thfloor.at/Experimental/SYSCALL/syscall_shiny7.h -- - #ifndef __SYSCALL_NEW_H - #define __SYSCALL_NEW_H - --/* Copyright (C) 2005 Herbert Pötzl -+/* Copyright (C) 2005-2006 Herbert Pötzl - - global config options - -@@ -39,12 +37,13 @@ - __sysc_rcon(n) ... syscall register constraint - __sysc_regs ... list of input regs for clobber - __sysc_type ... register type -+ __sysc_aout ... asm code output constraint - - if all else fails - - __sc_asmload(n,N,...) ... asm code to prepare arguments - __sc_asmsysc(n,N) ... asm code to execute syscall -- __sc_asmsave(n,r,e) ... asm code to store results -+ __sc_asmsave(n) ... asm code to store results - - */ - -@@ -243,7 +242,8 @@ - sret: r0(r28) - serr: (sret >= (unsigned)-EMAXERRNO) - call: ble 0x100(%%sr2, %%r0) -- clob: r1, r2, r4, r20, r29, r31, memory -+ clob: r1, r2, (r4), r20, r29, r31, memory -+ picr: pr(r19) - */ - - #define __sysc_max_err 4095 -@@ -253,13 +253,21 @@ - ("r26", "r25", "r24", "r23", "r22", "r21") - - #define __sysc_cmd_sys "ble 0x100(%%sr2,%%r0)" --#define __sysc_cmd_fin "ldi %0,%%r20" - --#define __sysc_clobber __sysc_regs, \ -- "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#define __sysc_pre(n) \ -+ __pasm(n,1,1, "copy %%r19, %%r4" , ) - --#warning syscall arch hppa not tested yet -+#define __sysc_fin(n) \ -+ __casm(n,1,1, "ldi %0,%%r20" , )\ -+ __pasm(n,1,1, "copy %%r4, %%r19" , ) - -+#ifndef __PIC__ -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r20", "r29", "r31", "memory" -+#else -+#define __sysc_clobber __sysc_regs, \ -+ "r1", "r2", "r4", "r20", "r29", "r31", "memory" -+#endif - - - /* ***************************************** -@@ -277,6 +285,7 @@ - sret: r0(eax) - serr: (sret >= (unsigned)-EMAXERRNO) - call: int 0x80 -+ picr: pr(ebx) - clob: memory - */ - -@@ -301,15 +310,18 @@ - __casm(n,6,1, "pushl %%ebp" , )\ - ""::__sc_iregs(n,__VA_ARGS__):__sysc_clobber) - -+#define __sc_asmsave(n) -+ - #define __sysc_pre(n) \ - __casm(n,6,1, "movl %%eax,%%ebp" , )\ -- __casm(n,0,1, "movl %0,%%eax" , )\ -+ __casm(n,0,1, "movl %1,%%eax" , )\ - - #define __sysc_fin(n) \ - __casm(n,6,1, "popl %%ebp" , )\ - __pasm(n,1,1, "popl %%ebx" , )\ - --#define __sysc_clobber __sysc_regs, "eax", "memory" -+#define __sysc_aout "=a"(__res) -+#define __sysc_clobber __sysc_regs, "memory" - - - /* ***************************************** -@@ -399,8 +411,43 @@ - - #elif defined(__mips__) - --#error syscall arch mips not implemented yet -+/* The ABIO32 calling convention uses a0-a3 to pass the first -+ four arguments, the rest is passed on the userspace stack. The 5th arg -+ starts at 16($sp). -+ -+ ABIN32 and ABI64 pass 6 args in a0-a3, t0-t1. -+ -+ scnr: id(v0) -+ args: a1(a0), a2(a1), a3(a2), a4(a3), a5(16($sp)), a6(20($sp)) -+ sret: r0(v0) -+ serr: e0(a3) -+ call: syscall -+ clob: at, v0, t0-t7, t8-t9 -+*/ -+ -+#define __sysc_reg_cid "v0" -+#define __sysc_reg_ret "v0" -+#define __sysc_reg_err "a3" -+#define __sysc_cmd_sys "syscall" -+ -+#define __sysc_reg(n) __arg_##n\ -+ ("a0","a1","a2","a3", "t0", "t1") - -+#define __sysc_clobber "$1", "$3", "$8", "$9", "$10", "$11", "$12", \ -+ "$13", "$14", "$15", "$24", "$25", "memory" -+ -+#if _MIPS_SIM == _ABIO32 -+#define __sysc_pre(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,-32",) \ -+ __casm(n,6,1,"sw $9,20($sp)",) \ -+ __casm(n,5,1,"sw $8, 16($sp)",) -+#define __sysc_fin(n) \ -+ __casm(n,5,1,"addiu $sp,$sp,32",) -+#elif (_MIPS_SIM == _ABIN32) || (_MIPS_SIM == _ABI64) -+#warning syscall arch mips with ABI N32 and 64 not tested yet -+#else -+#error unknown mips ABI version -+#endif - - - /* ***************************************** -@@ -651,6 +698,7 @@ - #define __sysc_clobber __sysc_regs, \ - "cc", "r11", "rcx", "memory" - -+#define __sysc_aout "=a"(__res) - - #else - #error unknown kernel arch -@@ -834,7 +882,7 @@ - #define __sc_inp_def(n,value) - #endif - --#ifndef __sysc_save -+#if !defined(__sysc_save) && !defined(__sysc_aout) - #define __sc_res_def(n,r) __sc_asm_reg(n, r); - #else - #define __sc_res_def(n,r) __sc_reg(n); -@@ -865,7 +913,6 @@ - #endif - - -- - #ifdef __sc_complex /* complex result */ - - #ifndef __sysc_errc -@@ -918,6 +965,7 @@ - return (type)(res) - #endif - -+ - #define __sc_results \ - __sc_res_def(__res, __sysc_reg_res) - -@@ -939,8 +987,13 @@ - __casm(n,3,0,"%3 ",) __casm(n,4,0,"%4 ",) __casm(n,5,0,"%5 ",) \ - __casm(n,6,0,"%6 ",) "*/" - -+#ifdef __sysc_aout -+#define __sc_dummy_save(n) -+#define __sc_asmsave(n) -+#else - #define __sc_dummy_save(n) "/* gcc dummy save " \ - __casm(n,0,0,"%0 ",) __casm(n,1,0,"%1 ",) "*/" -+#endif - - #define __comment(name) "\t/* kernel sys_" \ - #name "[" __stringify(__sc_id(name)) "] */" -@@ -1006,10 +1059,14 @@ - #endif - #endif - -+#ifndef __sysc_aout -+#define __sysc_aout -+#endif -+ - #ifndef __sc_asmsysc - #define __sc_asmsysc(n,N) __sc_asm_vol( \ - __casm(n,0,0, __sc_cmds(n,N) , )\ -- ::"i"(__sc_id(N)) : __sysc_clobber) -+ :__sysc_aout:"i"(__sc_id(N)) : __sysc_clobber) - #endif - - #ifndef __sc_asmsave -@@ -1031,33 +1088,33 @@ - - - --#define _syscall0(type, name) \ -+#define _syscall0(type, name) \ - type name(void) \ - __sc_body(0, type, name, *) - --#define _syscall1(type, name, type1, arg1) \ -+#define _syscall1(type, name, type1, arg1) \ - type name(type1 arg1) \ - __sc_body(1, type, name, arg1) - --#define _syscall2(type, name, type1, arg1, type2, arg2) \ -+#define _syscall2(type, name, type1, arg1, type2, arg2) \ - type name(type1 arg1, type2 arg2) \ - __sc_body(2, type, name, arg1, arg2) - --#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ -+#define _syscall3(type, name, type1, arg1, type2, arg2, type3, arg3) \ - type name(type1 arg1, type2 arg2, type3 arg3) \ - __sc_body(3, type, name, arg1, arg2, arg3) - --#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall4(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ - __sc_body(4, type, name, arg1, arg2, arg3, arg4) - --#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -- type4, arg4, type5, arg5) \ -+#define _syscall5(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+ type4, arg4, type5, arg5) \ - type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ - __sc_body(5, type, name, arg1, arg2, arg3, arg4, arg5) - --#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ -+#define _syscall6(type, name, type1, arg1, type2, arg2, type3, arg3, \ - type4, arg4, type5, arg5, type6, arg6) \ - type name(type1 arg1, type2 arg2, type3 arg3, \ - type4 arg4, type5 arg5, type6 arg6) \ diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-testsuite-fix.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-testsuite-fix.patch deleted file mode 100644 index b9cfd46..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-testsuite-fix.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -NurpP util-vserver-0.30.210/lib/testsuite/personality.c util-vserver-0.30.210-testfix/lib/testsuite/personality.c ---- util-vserver-0.30.210/lib/testsuite/personality.c 2005-12-31 11:31:55.000000000 +0100 -+++ util-vserver-0.30.210-testfix/lib/testsuite/personality.c 2006-03-16 17:41:30.239559250 +0100 -@@ -73,7 +73,6 @@ int main() - TEST_T2PF("SHORT_INODE", 0, SHORT_INODE); - TEST_T2PF("WHOLE_SECONDS", 0, WHOLE_SECONDS); - TEST_T2PF("STICKY_TIMEOUTS", 0, STICKY_TIMEOUTS); -- TEST_T2PF("ADDR_LIMIT_3GB", 0, ADDR_LIMIT_3GB); - - - // the _loc* tests -@@ -82,7 +81,6 @@ int main() - TEST_PF2T("SHORT_INODE", SHORT_INODE); - TEST_PF2T("WHOLE_SECONDS", WHOLE_SECONDS); - TEST_PF2T("STICKY_TIMEOUTS", STICKY_TIMEOUTS); -- TEST_PF2T("ADDR_LIMIT_3GB", ADDR_LIMIT_3GB); - - - -@@ -123,10 +121,10 @@ int main() - TEST_LIST("mmap_page_zero,any", 0, -1, MMAP_PAGE_ZERO, 15, 3); - - TEST_LIST("mmap_page_zero,addr_limit_32bit,short_inode,whole_seconds," -- "sticky_timeouts,addr_limit_3gb", -+ "sticky_timeouts", - 0, 0, - MMAP_PAGE_ZERO|ADDR_LIMIT_32BIT|SHORT_INODE|WHOLE_SECONDS| -- STICKY_TIMEOUTS|ADDR_LIMIT_3GB, -+ STICKY_TIMEOUTS, - -1, 0); - - TEST_T2PT("linux", 0, PER_LINUX); -diff -NurpP util-vserver-0.30.210/src/testsuite/vunify-test.sh util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh ---- util-vserver-0.30.210/src/testsuite/vunify-test.sh 2005-03-21 21:03:33.000000000 +0100 -+++ util-vserver-0.30.210-testfix/src/testsuite/vunify-test.sh 2006-03-16 17:37:04.014921250 +0100 -@@ -1,6 +1,7 @@ - #! /bin/bash - --: ${srcdir=.} -+: ${srcdir:=.} -+: ${builddir:=.} - : ${tmptopdir=/var/tmp} - - set -e -@@ -49,5 +50,5 @@ pushd $tmpdir &>/dev/null - popd &>/dev/null - - --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null --$D ./src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/b '' >/dev/null -+$builddir/src/vunify -n --manually $tmpdir/a '' $tmpdir/c '' >/dev/null diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-vlogin.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-vlogin.patch deleted file mode 100644 index e24296e..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-vlogin.patch +++ /dev/null @@ -1,514 +0,0 @@ -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers.h ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers.h 2006-01-22 12:18:14.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers.h 2006-04-04 04:18:38.000000000 +0200 -@@ -111,6 +111,10 @@ - # include "wrappers-stat.hc" - #endif - -+#ifdef ENSC_WRAPPERS_TERMIOS -+# include "wrappers-termios.hc" -+#endif -+ - #undef ENSC_DETAIL2 - #undef ENSC_DETAIL1 - #undef ENSC_DOQUOTE_COND -diff -Nurp util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers-termios.hc ---- util-vserver-0.30.210.orig/ensc_wrappers/wrappers-termios.hc 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/ensc_wrappers/wrappers-termios.hc 2006-04-04 04:18:38.000000000 +0200 -@@ -0,0 +1,32 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+#ifndef H_ENSC_IN_WRAPPERS_H -+# error wrappers-termios.hc can not be used in this way -+#endif -+ -+inline static WRAPPER_DECL void -+Etcgetattr(int fd, struct termios *termios_p) -+{ -+ FatalErrnoError(tcgetattr(fd, termios_p)==-1, "tcgetattr()"); -+} -+ -+inline static WRAPPER_DECL void -+Etcsetattr(int fd, int optional_actions, struct termios *termios_p) -+{ -+ FatalErrnoError(tcsetattr(fd, optional_actions, termios_p)==-1, "tcsetattr()"); -+} -diff -Nurp util-vserver-0.30.210.orig/Makefile.in util-vserver-0.30.210.vlogin/Makefile.in ---- util-vserver-0.30.210.orig/Makefile.in 2006-01-22 20:33:21.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/Makefile.in 2006-04-04 05:00:11.000000000 +0200 -@@ -965,7 +965,7 @@ src_testsuite_vunify_functest_DEPENDENCI - am_src_vattribute_OBJECTS = src/vattribute.$(OBJEXT) - src_vattribute_OBJECTS = $(am_src_vattribute_OBJECTS) - src_vattribute_DEPENDENCIES = $(am__DEPENDENCIES_11) --am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) -+am_src_vcontext_OBJECTS = src/vcontext.$(OBJEXT) src/vlogin.$(OBJEXT) - src_vcontext_OBJECTS = $(am_src_vcontext_OBJECTS) - src_vcontext_DEPENDENCIES = $(am__DEPENDENCIES_11) \ - $(am__DEPENDENCIES_9) -@@ -1746,7 +1746,7 @@ src_chbind_LDFLAGS = $(VSERVER_LDFLGS) - src_chcontext_compat_SOURCES = src/chcontext.c - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - src_vsched_SOURCES = src/vsched.c -@@ -3489,6 +3489,8 @@ src/vattribute$(EXEEXT): $(src_vattribut - $(LINK) $(src_vattribute_LDFLAGS) $(src_vattribute_OBJECTS) $(src_vattribute_LDADD) $(LIBS) - src/vcontext.$(OBJEXT): src/$(am__dirstamp) \ - src/$(DEPDIR)/$(am__dirstamp) -+src/vlogin.$(OBJEXT): src/$(am__dirstamp) \ -+ src/$(DEPDIR)/$(am__dirstamp) - src/vcontext$(EXEEXT): $(src_vcontext_OBJECTS) $(src_vcontext_DEPENDENCIES) src/$(am__dirstamp) - @rm -f src/vcontext$(EXEEXT) - $(LINK) $(src_vcontext_LDFLAGS) $(src_vcontext_OBJECTS) $(src_vcontext_LDADD) $(LIBS) -@@ -4222,6 +4224,7 @@ mostlyclean-compile: - -rm -f src/vdu.$(OBJEXT) - -rm -f src/vhashify.$(OBJEXT) - -rm -f src/vlimit.$(OBJEXT) -+ -rm -f src/vlogin.$(OBJEXT) - -rm -f src/vnamespace.$(OBJEXT) - -rm -f src/vps.$(OBJEXT) - -rm -f src/vreboot.$(OBJEXT) -@@ -4593,6 +4596,7 @@ distclean-compile: - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vdu.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vhashify.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlimit.Po@am__quote@ -+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vlogin.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vnamespace.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vps.Po@am__quote@ - @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/vreboot.Po@am__quote@ -diff -Nurp util-vserver-0.30.210.orig/scripts/vserver.functions util-vserver-0.30.210.vlogin/scripts/vserver.functions ---- util-vserver-0.30.210.orig/scripts/vserver.functions 2006-01-22 13:24:25.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/scripts/vserver.functions 2006-04-04 04:18:38.000000000 +0200 -@@ -39,7 +39,7 @@ declare -a ENTER_SHELL=() - - declare -a OPTS_VCONTEXT_CREATE=() - declare -a OPTS_VCONTEXT_MIGRATE=() --declare -a OPTS_VCONTEXT_ENTER=() -+declare -a OPTS_VCONTEXT_ENTER=( --vlogin ) - declare -a OPTS_VATTRIBUTE=( --flag fakeinit ) - declare -a OPTS_VSCHED=() - -diff -Nurp util-vserver-0.30.210.orig/src/Makefile-files util-vserver-0.30.210.vlogin/src/Makefile-files ---- util-vserver-0.30.210.orig/src/Makefile-files 2006-01-22 12:28:00.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/src/Makefile-files 2006-04-04 04:18:38.000000000 +0200 -@@ -167,7 +167,7 @@ src_chcontext_compat_SOURCES = src/chcon - src_chcontext_compat_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_chcontext_compat_LDFLAGS = $(VSERVER_LDFLGS) - --src_vcontext_SOURCES = src/vcontext.c -+src_vcontext_SOURCES = src/vcontext.c src/vlogin.c - src_vcontext_LDADD = $(VSERVER_LDADDS) $(LIBINTERNAL) - src_vcontext_LDFLAGS = $(VSERVER_LDFLGS) - -diff -Nurp util-vserver-0.30.210.orig/src/vcontext.c util-vserver-0.30.210.vlogin/src/vcontext.c ---- util-vserver-0.30.210.orig/src/vcontext.c 2005-10-30 00:38:36.000000000 +0200 -+++ util-vserver-0.30.210.vlogin/src/vcontext.c 2006-04-04 04:18:38.000000000 +0200 -@@ -62,6 +62,7 @@ - #define CMD_NAMESPACE 0x400d - #define CMD_PERSTYPE 0x400e - #define CMD_PERSFLAG 0x400f -+#define CMD_VLOGIN 0x4010 - - - struct option const -@@ -85,6 +86,7 @@ CMDLINE_OPTIONS[] = { - { "syncmsg", required_argument, 0, CMD_SYNCMSG }, - { "personality-type", required_argument, 0, CMD_PERSTYPE }, - { "personality-flags", required_argument, 0, CMD_PERSFLAG }, -+ { "vlogin", no_argument, 0, CMD_VLOGIN }, - #if 1 - { "fakeinit", no_argument, 0, CMD_INITPID }, // compatibility - #endif -@@ -100,6 +102,7 @@ struct Arguments { - bool is_initpid; - bool is_silentexist; - bool set_namespace; -+ bool do_vlogin; - uint_least32_t personality_flags; - uint_least32_t personality_type; - int verbosity; -@@ -112,6 +115,8 @@ struct Arguments { - - int wrapper_exit_code = 255; - -+void do_vlogin(char *argv[]); -+ - static void - showHelp(int fd, char const *cmd, int res) - { -@@ -145,6 +150,7 @@ showHelp(int fd, char const *cmd, int re - " --syncmsg <message>\n" - " ... use <message> as synchronization message; by\n" - " default, 'ok' will be used\n" -+ " --vlogin ... enable terminal proxy\n" - "\n" - "'vcontext --create' exits with code 254 iff the context exists already.\n" - "\n" -@@ -287,12 +293,15 @@ doit(struct Arguments const *args, char - sys_personality(args->personality_type | args->personality_flags)==-1) { - perror(ENSC_WRAPPERS_PREFIX "personality()"); - exit(wrapper_exit_code); -- } -+ } - - doExternalSync(ext_sync_fd, args->sync_msg); - doSyncStage1(p, args->do_disconnect); - DPRINTF("doit: pid=%u, ppid=%u\n", getpid(), getppid()); -- execvp (argv[optind],argv+optind); -+ if (!args->do_vlogin) -+ execvp (argv[optind],argv+optind); -+ else -+ do_vlogin(argv+optind); - doSyncStage2(p, args->do_disconnect); - - PERROR_Q(ENSC_WRAPPERS_PREFIX "execvp", argv[optind]); -@@ -341,6 +350,7 @@ int main (int argc, char *argv[]) - .do_migrateself = false, - .do_disconnect = false, - .do_endsetup = false, -+ .do_vlogin = false, - .is_initpid = false, - .is_silentexist = false, - .set_namespace = false, -@@ -363,6 +373,7 @@ int main (int argc, char *argv[]) - case CMD_MIGRATE : args.do_migrate = true; break; - case CMD_DISCONNECT : args.do_disconnect = true; break; - case CMD_ENDSETUP : args.do_endsetup = true; break; -+ 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_NAMESPACE : args.set_namespace = true; break; -diff -Nurp util-vserver-0.30.210.orig/src/vlogin.c util-vserver-0.30.210.vlogin/src/vlogin.c ---- util-vserver-0.30.210.orig/src/vlogin.c 1970-01-01 01:00:00.000000000 +0100 -+++ util-vserver-0.30.210.vlogin/src/vlogin.c 2006-04-04 06:48:12.000000000 +0200 -@@ -0,0 +1,312 @@ -+// $Id$ -+ -+// Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+// Based on vserver-utils' vlogin program. -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "util.h" -+#include <lib/vserver.h> -+#include <lib/fmt.h> -+ -+#include <stdlib.h> -+#include <getopt.h> -+#include <stdint.h> -+#include <errno.h> -+#include <sys/stat.h> -+#include <sys/ioctl.h> -+#include <sys/wait.h> -+#include <sys/socket.h> -+#include <termios.h> -+#include <signal.h> -+#include <pty.h> -+#include <fcntl.h> -+ -+#define ENSC_WRAPPERS_PREFIX "vlogin: " -+#define ENSC_WRAPPERS_IOCTL 1 -+#define ENSC_WRAPPERS_UNISTD 1 -+#define ENSC_WRAPPERS_SOCKET 1 -+#define ENSC_WRAPPERS_IO 1 -+#define ENSC_WRAPPERS_TERMIOS 1 -+#define ENSC_WRAPPERS_FCNTL 1 -+#include <wrappers.h> -+ -+struct terminal { -+ int fd; /* terminal file descriptor */ -+ struct termios term; /* terminal settings */ -+ struct winsize ws; /* terminal size */ -+ pid_t pid; /* terminal process id */ -+ struct termios termo; /* original terminal settings */ -+ enum { TS_RESET, TS_RAW } state; /* terminal state */ -+}; -+ -+static struct terminal t; -+extern int wrapper_exit_code; -+ -+/* set terminal to raw mode */ -+static void -+terminal_raw(void) -+{ -+ struct termios buf; -+ -+ /* save original terminal settings */ -+ Etcgetattr(STDIN_FILENO, &t.termo); -+ -+ buf = t.termo; -+ -+ /* echo off -+ ** canonical mode off -+ ** extended input processing off -+ ** signal chars off */ -+ buf.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); -+ -+ /* no SIGINT on BREAK -+ ** CR-to-NL off -+ ** input parity check off -+ ** don't strip 8th bit on input -+ ** output flow control off */ -+ buf.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); -+ -+ /* clear size bits -+ ** parity checking off */ -+ buf.c_cflag &= ~(CSIZE | PARENB); -+ -+ /* set 8 bits/char */ -+ buf.c_cflag |= CS8; -+ -+ /* output processing off */ -+ buf.c_oflag &= ~(OPOST); -+ -+ /* 1 byte at a time -+ ** no timer */ -+ buf.c_cc[VMIN] = 1; -+ buf.c_cc[VTIME] = 0; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &buf); -+ -+ t.state = TS_RAW; -+} -+ -+/* reset terminal to original state */ -+static void -+terminal_reset(void) -+{ -+ if (t.state != TS_RAW) -+ return; -+ -+ Etcsetattr(STDIN_FILENO, TCSAFLUSH, &t.termo); -+ -+ t.state = TS_RESET; -+} -+ -+/* exit handler */ -+static void -+terminal_atexit(void) -+{ -+ terminal_reset(); -+} -+ -+/* send signal to terminal */ -+static void -+terminal_kill(int sig) -+{ -+ pid_t pgrp = -1; -+ -+ /* try to get process group leader */ -+ if (ioctl(t.fd, TIOCGPGRP, &pgrp) >= 0 && -+ pgrp != -1 && -+ kill(-pgrp, sig) != -1) -+ return; -+ -+ /* fallback using terminal pid */ -+ kill(-t.pid, sig); -+} -+ -+/* redraw the terminal screen */ -+static void -+terminal_redraw(void) -+{ -+ /* get winsize from stdin */ -+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &t.ws) == -1) -+ return; -+ -+ /* set winsize in terminal */ -+ ioctl(t.fd, TIOCSWINSZ, &t.ws); -+ -+ /* set winsize change signal to terminal */ -+ terminal_kill(SIGWINCH); -+} -+ -+/* copy terminal activity to user */ -+static void -+terminal_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ /* read terminal activity */ -+ len = Eread(t.fd, buf, sizeof(buf)); -+ -+ /* write activity to user */ -+ EwriteAll(STDOUT_FILENO, buf, len); -+} -+ -+/* copy user activity to terminal */ -+static void -+user_activity(void) -+{ -+ char buf[64]; -+ size_t len; -+ -+ len = Eread(STDIN_FILENO, buf, sizeof(buf)); -+ EwriteAll(t.fd, buf, len); -+} -+ -+/* shuffle all output, and reset the terminal */ -+static void -+terminal_end(void) -+{ -+ char buf[64]; -+ ssize_t len; -+ long options; -+ -+ options = Efcntl(t.fd, F_GETFL, 0) | O_NONBLOCK; -+ Efcntl(t.fd, F_SETFL, options); -+ for (;;) { -+ len = read(t.fd, buf, sizeof(buf)); -+ if (len == 0 || len == -1) -+ break; -+ EwriteAll(STDOUT_FILENO, buf, len); -+ } -+ -+ /* in case atexit hasn't been setup yet */ -+ terminal_reset(); -+} -+ -+/* catch signals */ -+static void -+signal_handler(int sig) -+{ -+ int status; -+ -+ switch(sig) { -+ /* catch interrupt */ -+ case SIGINT: -+ terminal_kill(sig); -+ break; -+ -+ /* terminal died */ -+ case SIGCHLD: -+ terminal_end(); -+ wait(&status); -+ exit(WEXITSTATUS(status)); -+ break; -+ -+ /* window size has changed */ -+ case SIGWINCH: -+ terminal_redraw(); -+ break; -+ -+ default: -+ exit(0); -+ } -+ -+} -+ -+void do_vlogin(char *argv[]) -+{ -+ int slave; -+ pid_t pid; -+ int n; -+ fd_set rfds; -+ -+ if (!isatty(0) || !isatty(1)) { -+ execvp(argv[0], argv); -+ return; -+ } -+ -+ /* set terminal to raw mode */ -+ terminal_raw(); -+ -+ /* fork new pseudo terminal */ -+ if (openpty(&t.fd, &slave, NULL, NULL, NULL) == -1) { -+ perror(ENSC_WRAPPERS_PREFIX "openpty()"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* setup SIGCHLD here, so we're sure to get the signal */ -+ signal(SIGCHLD, signal_handler); -+ -+ pid = Efork(); -+ -+ if (pid == 0) { -+ /* we don't need the master side of the terminal */ -+ close(t.fd); -+ -+ /* login_tty() stupid dietlibc doesn't have it */ -+ Esetsid(); -+ -+ Eioctl(slave, TIOCSCTTY, NULL); -+ -+ Edup2(slave, 0); -+ Edup2(slave, 1); -+ Edup2(slave, 2); -+ -+ if (slave > 2) -+ close(slave); -+ -+ Eexecvp(argv[0], argv); -+ } -+ -+ /* setup SIGINT and SIGWINCH here, as they can cause loops in the child */ -+ signal(SIGWINCH, signal_handler); -+ signal(SIGINT, signal_handler); -+ -+ /* save terminals pid */ -+ t.pid = pid; -+ -+ /* we want a redraw */ -+ atexit(terminal_atexit); -+ terminal_redraw(); -+ -+ /* main loop */ -+ for (;;) { -+ /* init file descriptors for select */ -+ FD_ZERO(&rfds); -+ FD_SET(STDIN_FILENO, &rfds); -+ FD_SET(t.fd, &rfds); -+ n = t.fd; -+ -+ /* wait for something to happen */ -+ while (select(n + 1, &rfds, NULL, NULL, NULL) == -1) { -+ if (errno == EINTR || errno == EAGAIN) -+ continue; -+ perror(ENSC_WRAPPERS_PREFIX "select()"); -+ exit(wrapper_exit_code); -+ } -+ -+ if (FD_ISSET(STDIN_FILENO, &rfds)) -+ user_activity(); -+ -+ if (FD_ISSET(t.fd, &rfds)) -+ terminal_activity(); -+ } -+ -+ /* never get here, signal handler exits */ -+} diff --git a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-vprocunhide-fix.patch b/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-vprocunhide-fix.patch deleted file mode 100644 index 5e0bf95..0000000 --- a/util-vserver/patches/0.30.210-r9/util-vserver-0.30.210-vprocunhide-fix.patch +++ /dev/null @@ -1,9 +0,0 @@ -Index: util-vserver-0.30.210/distrib/misc/vprocunhide-files -=================================================================== ---- util-vserver-0.30.210.orig/distrib/misc/vprocunhide-files -+++ util-vserver-0.30.210/distrib/misc/vprocunhide-files -@@ -28,3 +28,4 @@ - /proc/uptime - -/proc/cmdline - /proc/version -+/proc/mounts diff --git a/util-vserver/patches/0.30.211-r1/000_README b/util-vserver/patches/0.30.211-r1/000_README deleted file mode 100644 index f4d6995..0000000 --- a/util-vserver/patches/0.30.211-r1/000_README +++ /dev/null @@ -1,55 +0,0 @@ -Numbering scheme --------------------------------------- -FIXES -000_all - 195_all - -FEATURES -200_all - 395_all - -Patch descriptions: --------------------------------------- - -Patch: 005_all_baselayout-1.13.patch -From: Benedikt Boehm -Desc: Provide necessary changes to support plain! sys-apps/baselayout (>=1.13) - -Patch: 010_all_vyumworker-fixes.patch -From: Daniel Hokka Zakrisson -Desc: Fix a bug in the warning code; Improve the versions handled by the vyum-wrapper - -Patch: 015_all_chroot-sh.c.patch -From: Benedikt Boehm -Desc: Adding `mkdir' and `chmod' functions to chroot-sh - -Patch: 020_all_vserver-build.template.patch -From: Benedikt Boehm -Desc: Fix the `no_dev_sanity' logic - -Patch: 025_all_namespace-cleanup.patch -From: Daniel Hokka Zakrisson -Desc: Improve namespace cleanup to make sure some required directories stick around, - and add some configuration options to exclude further paths. - -Patch: 030_all_gentoo-wrapper.patch -From: Benedikt Boehm -Desc: add gentoo specific wrappers: vemerge, vesync, vupdateworld and vdispatch-conf - -Patch: 035_all_optional-vlogin.patch -From: Daniel Hokka Zakrisson -Desc: Make vlogin optional. - -Patch: 040_all_kernel-headers.patch -From: Daniel Hokka Zakrisson -Desc: Adds support for the 2.1 vserver API. - -Patch: 045_all_exec-limits-reset.patch -From: Daniel Hokka Zakrisson -Desc: Reset all limits that aren't configured. - -Patch: 210_all_gentoo-tools.patch -From: Benedikt Boehm and Christian Heim -Desc: Adding various Gentoo related scripts (vemerge, vdispatch-conf, ...) - -Patch: 215_all_shell-completion.patch -From: Thomas Champagne and Ben Voui(?) -Desc: Adding bash/zsh completion scripts diff --git a/util-vserver/patches/0.30.211-r1/005_all_baselayout-1.13.patch b/util-vserver/patches/0.30.211-r1/005_all_baselayout-1.13.patch deleted file mode 100644 index 782c3f1..0000000 --- a/util-vserver/patches/0.30.211-r1/005_all_baselayout-1.13.patch +++ /dev/null @@ -1,243 +0,0 @@ -Index: scripts/vserver.functions -=================================================================== ---- scripts/vserver.functions (revision 2354) -+++ scripts/vserver.functions (revision 2370) -@@ -299,8 +299,28 @@ - ;; - - (xgentoo) -- panic "init-style '$INITSTYLE' is no longer supported; please use plain instead; aborting";; -+ test -n "$RUNLEVEL_START" || RUNLEVEL_START="default" - -+ INITCMD_START=( /lib/rcscripts/sh/init-vserver.sh "$RUNLEVEL_START" ) -+ INITCMD_STOP=( /sbin/rc shutdown ) -+ INITCMD_PREPARE=( $_FAKE_RUNLEVEL 3 /var/run/utmp ) -+ -+ pushd "$vdir"/vdir &>/dev/null -+ basever=$($_CHROOT_SH cat /etc/gentoo-release | $_AWK '{print $5}') -+ popd &>/dev/null -+ -+ basemaj=${basever/.*} -+ basemin=${basever#*.} -+ basemin=${basemin/.*} -+ -+ test "$basemaj" -lt 1 -o "$basemin" -lt 13 && \ -+ panic "\ -+Using init-style 'gentoo' requires >=baselayout-1.13 inside the vserver! -+ -+Your vserver ($(basename "$vdir")) seems to have baselayout-$basever, -+please use 'plain' init-style instead!" -+ ;; -+ - (x) ;; - (*) panic "Unknown init-style '$INITSTYLE'; aborting";; - esac -Index: distrib/Makefile.am -=================================================================== ---- distrib/Makefile.am (revision 2354) -+++ distrib/Makefile.am (revision 2370) -@@ -31,7 +31,9 @@ - nobase_distrib_SCRIPTS = redhat/initpost \ - redhat/initpre \ - redhat/rc.sysinit \ -- gentoo/initpost -+ gentoo/initpost \ -+ gentoo/initpre \ -+ gentoo/init-vserver.sh - - nobase_distrib_DATA = defaults/devs \ - defaults/apt.conf \ -Index: distrib/gentoo/init-vserver.sh -=================================================================== ---- distrib/gentoo/init-vserver.sh (revision 0) -+++ distrib/gentoo/init-vserver.sh (revision 2370) -@@ -0,0 +1,29 @@ -+#!/bin/bash -+# -+# Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+# -+# BIG FAT WARNING: -+# -+# Do not remove this file if you are using gentoo init style! -+# Your vserver will not boot anymore! -+# -+# You have been warned... -+# -+ -+RUNLEVEL=1 /sbin/rc sysinit -+/sbin/rc boot -+/sbin/rc ${1:-default} -Index: distrib/gentoo/initpost -=================================================================== ---- distrib/gentoo/initpost (revision 2354) -+++ distrib/gentoo/initpost (revision 2370) -@@ -1,6 +1,6 @@ --#! /bin/bash -+#!/bin/bash - --# Copyright (C) 2005 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> -+# Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org> - # - # 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 -@@ -17,12 +17,87 @@ - - ## Called as: initpost <cfgdir> <path of util-vserver-vars> - -+vdir="$1"/vdir - . "$2" - --$_MKDIR -p "$1"/vdir/usr/portage -+# portage stuff -+pushd "$vdir" &>/dev/null -+$_CHROOT_SH mkdir /usr 2>/dev/null || : -+$_CHROOT_SH mkdir /usr/portage 2>/dev/null || : -+popd &>/dev/null - --$_CAT <<EOF >> "$1"/fstab --# shared portage tree --/usr/portage /usr/portage none bind,ro 0 0 --/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0 --EOF -+ -+# gentoo initstyle magic -+initstyle=sysv -+test -e "$1"/apps/init/style && initstyle=$(<"$1"/apps/init/style) -+ -+if test "$initstyle" == "gentoo"; then -+ pushd "$vdir" &>/dev/null -+ -+ echo ">>> Installing special init-style magic ... " -+ -+ $_CAT "$__DISTRIBDIR"/gentoo/init-vserver.sh | \ -+ $_CHROOT_SH truncate /lib/rcscripts/sh/init-vserver.sh -+ $_CHROOT_SH chmod 0755 /lib/rcscripts/sh/init-vserver.sh -+ -+ popd &>/dev/null -+ -+ echo "!!!" -+ echo "!!! You have to install a service (e.g. syslog-ng) and add it to the" -+ echo "!!! default runlevel before you start the guest the first time!" -+ echo "!!! Otherwise the guest will die as soon as it has finished booting." -+ echo "!!!" -+ echo "!!! Consult the Gentoo Handbook on how to chroot and install" -+ echo "!!! packages into the guest environment." -+ echo "!!!" -+fi -+ -+ -+# check for baselayout >= 1.13 -+pushd "$vdir" &>/dev/null -+basever=$($_CHROOT_SH cat /etc/gentoo-release | $_AWK '{print $5}') -+popd &>/dev/null -+ -+echo ">>> Found baselayout-$basever" -+ -+basemaj=${basever/.*} -+basemin=${basever#*.} -+basemin=${basemin/.*} -+ -+if test "$basemaj" -lt 1 -o "$basemin" -lt 13; then -+ echo "!!! Will not do automagic changes to baselayout < 1.13" -+ echo "!!! You have to take care for yourself ..." -+ exit 0 -+fi -+ -+ -+# fix gettys in inittab -+pushd "$vdir" &>/dev/null -+ -+if $_CHROOT_SH testfile /etc/inittab; then -+ echo ">>> Fixing inittab ... " -+ inittabtmp=$($_MKTEMP inittab.XXXXXX) -+ -+ $_CHROOT_SH cat /etc/inittab | \ -+ $_SED 's/\(^[^#].*getty.*$\)/#\1/' > $inittabtmp -+ $_CHROOT_SH truncate /etc/inittab < $inittabtmp -+ -+ $_RM -f $inittabtmp -+fi -+ -+popd &>/dev/null -+ -+ -+# unneeded runlevel scripts -+pushd "$vdir" &>/dev/null -+echo ">>> Fixing default runlevel scripts ... " -+$_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || : -+$_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || : -+popd &>/dev/null -+ -+ -+# fix fstab for checkfs/localmount -+pushd "$vdir" &>/dev/null -+echo ">>> Fixing fstab ... " -+echo "/dev/hdv1 / ufs defaults 0 0" | $_CHROOT_SH truncate /etc/fstab -+popd &>/dev/null -Index: distrib/gentoo/initpre -=================================================================== ---- distrib/gentoo/initpre (revision 0) -+++ distrib/gentoo/initpre (revision 2370) -@@ -0,0 +1,48 @@ -+#!/bin/bash -+ -+# Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+## Called as: initpost <cfgdir> <path of util-vserver-vars> -+ -+vdir="$1"/vdir -+. "$2" -+ -+# portage stuff -+ -+echo ">>> Adding shared /usr/portage to fstab ... " -+ -+if test -d /usr/portage; then -+ ( echo -+ echo "# shared portage tree" -+ echo "/usr/portage /usr/portage none bind,ro 0 0" -+ echo "/usr/portage/distfiles /usr/portage/distfiles none bind,rw 0 0" -+ ) >> "$1"/fstab -+else -+ echo "!!! Cannot find /usr/portage! You should definitely use a" -+ echo "!!! shared portage tree if you have multiple Gentoo guests!" -+fi -+ -+ -+# initstyle sanity -+initstyle=sysv -+test -e "$1"/apps/init/style && initstyle=$(<"$1"/apps/init/style) -+ -+echo ">>> Checking init-style ... $initstyle" -+ -+if test "$initstyle" != "gentoo" -a "$initstyle" != "plain"; then -+ echo "!!! The init-style you specified is not supported for Gentoo" -+ echo "!!! Please use one of: plain, gentoo" -+fi diff --git a/util-vserver/patches/0.30.211-r1/010_all_vyumworker-fixes.patch b/util-vserver/patches/0.30.211-r1/010_all_vyumworker-fixes.patch deleted file mode 100644 index 4900a51..0000000 --- a/util-vserver/patches/0.30.211-r1/010_all_vyumworker-fixes.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: scripts/vyum-worker -=================================================================== ---- scripts/vyum-worker (revision 2354) -+++ scripts/vyum-worker (revision 2370) -@@ -60,11 +60,11 @@ - (2.[012345]*) - check 'import yum,sys; sys.exit(not hasattr(yum.config.yumconf, "getRootedPath"))' - ;; -- (2.[6789]*) -+ (2.[6789]*|3.0*) - check 'import yum,sys; sys.exit(not hasattr(yum.config.YumConf, "getRootedPath"))' - ;; - (*) -- warning"\ -+ warning "\ - You are using a version of yum which current status is unknown to vyum. - - Just to be sure, 'vyum' will use dirty hacks which might not work when - diff --git a/util-vserver/patches/0.30.211-r1/015_all_chroot-sh.c.patch b/util-vserver/patches/0.30.211-r1/015_all_chroot-sh.c.patch deleted file mode 100644 index e84f2a0..0000000 --- a/util-vserver/patches/0.30.211-r1/015_all_chroot-sh.c.patch +++ /dev/null @@ -1,93 +0,0 @@ -Index: src/chroot-sh.c -=================================================================== ---- src/chroot-sh.c (revision 2358) -+++ src/chroot-sh.c (revision 2359) -@@ -142,7 +142,55 @@ - return res!=-1 && S_ISREG(res) ? EXIT_SUCCESS : EXIT_FAILURE; - } - -+static int -+execMkdir(int argc, char *argv[]) -+{ -+ int i = 1; -+ int res = EXIT_SUCCESS; -+ -+ if (argc<2) { -+ WRITE_MSG(2, "No files specified for 'mkdir' operation; try '--help' for more information\n"); -+ return wrapper_exit_code; -+ } - -+ for (;i<argc; ++i) { -+ if (mkdir(argv[i], 0755)==-1) { -+ PERROR_Q(ENSC_WRAPPERS_PREFIX "mkdir", argv[i]); -+ res = EXIT_FAILURE; -+ } -+ } -+ -+ return res; -+} -+ -+static int -+execChmod(int argc, char *argv[]) -+{ -+ int i = 2; -+ int res = EXIT_SUCCESS; -+ unsigned long mode; -+ -+ if (argc<3) { -+ WRITE_MSG(2, "No files specified for 'chmod' operation; try '--help' for more information\n"); -+ return wrapper_exit_code; -+ } -+ -+ if (!isNumberUnsigned(argv[1], &mode, 1)) { -+ WRITE_MSG(2, "Invalid mode: '"); -+ WRITE_STR(2, argv[1]); -+ return EXIT_FAILURE; -+ } -+ -+ for (;i<argc; ++i) { -+ if (chmod(argv[i], mode)==-1) { -+ PERROR_Q(ENSC_WRAPPERS_PREFIX "chmod", argv[i]); -+ res = EXIT_FAILURE; -+ } -+ } -+ -+ return res; -+} -+ - static struct Command { - char const *cmd; - int (*handler)(int argc, char *argv[]); -@@ -152,6 +200,8 @@ - { "truncate", execTruncate }, - { "testfile", execTestFile }, - { "rm", execRm }, -+ { "mkdir", execMkdir }, -+ { "chmod", execChmod }, - { 0,0 } - }; - -@@ -170,7 +220,10 @@ - " append <file> ... appends stdin to <file> which is created when needed\n" - " truncate <file> ... clear <file> and fill it with stdin; the <file> is\n" - " created when needed\n" -- " rm <file>+ ... unlink the given files\n\n" -+ " rm <file>+ ... unlink the given files\n" -+ " mkdir <file>+ ... create the given directories\n" -+ " chmod <mode> <file>+\n" -+ " ... change access permissions of files\n\n" - "Please report bugs to " PACKAGE_BUGREPORT "\n"); - exit(0); - } -Index: src/Makefile-files -=================================================================== ---- src/Makefile-files (revision 2358) -+++ src/Makefile-files (revision 2359) -@@ -181,6 +181,7 @@ - - src_chain_echo_SOURCES = src/chain-echo.c - src_chroot_sh_SOURCES = src/chroot-sh.c -+src_chroot_sh_LDADD = $(LIBINTERNAL) - src_exec_cd_SOURCES = src/exec-cd.c - src_fakerunlevel_SOURCES = src/fakerunlevel.c - src_ifspec_SOURCES = src/ifspec.c diff --git a/util-vserver/patches/0.30.211-r1/020_all_vserver-build.template.patch b/util-vserver/patches/0.30.211-r1/020_all_vserver-build.template.patch deleted file mode 100644 index d419379..0000000 --- a/util-vserver/patches/0.30.211-r1/020_all_vserver-build.template.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: scripts/vserver-build.template -=================================================================== ---- scripts/vserver-build.template (revision 2357) -+++ scripts/vserver-build.template (revision 2358) -@@ -88,7 +88,7 @@ - $DECOMPRESS "$t" | $EXTRACT - done - --test -z "$no_dev_sanity" || { -+test -z "$no_dev_sanity" && { - rm -rf dev/* - populateDev - } diff --git a/util-vserver/patches/0.30.211-r1/025_all_namespace-cleanup.patch b/util-vserver/patches/0.30.211-r1/025_all_namespace-cleanup.patch deleted file mode 100644 index a952f9d..0000000 --- a/util-vserver/patches/0.30.211-r1/025_all_namespace-cleanup.patch +++ /dev/null @@ -1,99 +0,0 @@ -Index: scripts/vserver.functions -=================================================================== ---- scripts/vserver.functions (revision 2356) -+++ scripts/vserver.functions (revision 2357) -@@ -805,7 +805,7 @@ - _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}" - - isNamespaceCleanup "$cfgdir" && \ -- _namespaceCleanup -+ _namespaceCleanup "$cfgdir" - - isAvoidNamespace "$cfgdir" || \ - $_SECURE_MOUNT --rbind -n "$vdir" "/" -@@ -1161,26 +1161,39 @@ - - function _namespaceCleanup - { -- local root=$(readlink -f "$vdir") -- local tmp="$root" -+ local vdir="$1" -+ local root=$($_VSERVER_INFO "$1" VDIR 1) - local -a list -- while [ "$tmp" ]; do -- list=( "${list[@]}" "$tmp" ) -- tmp="${tmp%/*}" -+ local -a skip -+ local tmp -+ -+ getFileArray skip "$vdir"/namespace-cleanup-skip \ -+ "$__CONFDIR"/.defaults/namespace-cleanup-skip || : -+ -+ # these are things that have to be accessible post-cleanup -+ for tmp in "$root" "$__SBINDIR" "$__PKGLIBDIR" "$vdir" \ -+ "$__PKGSTATEDIR" "${skip[@]}"; do -+ while test -n "$tmp"; do -+ list=( "${list[@]}" "$tmp" ) -+ tmp="${tmp%/*}" -+ done - done -+ - local -a list_umount - while read dev path opts; do -- [ "$path" ] || continue -- for i in "$root" /dev /proc; do -- [ "${path#$i}" != "$path" ] && continue 2 -- done -- for i in "${list[@]}" /; do -- [ "$path" = "$i" ] && continue 2 -- done -- list_umount=( "${list_umount[@]}" "$path" ) -+ test -n "$path" || continue -+ for i in "$root" /dev /proc; do -+ test "${path#$i}" != "$path" && continue 2 -+ done -+ for i in "${list[@]}" /; do -+ test "$path" = "$i" && continue 2 -+ done -+ # unmount them in reverse order so mounts further down the tree get unmounted first -+ list_umount=( "$path" "${list_umount[@]}" ) - done < /proc/mounts -+ # separate loop to avoid races while reading /proc/mounts - for i in "${list_umount[@]}"; do -- umount -l -n "$i" -+ $_UMOUNT -l -n "$i" - done - } - -Index: doc/configuration.xml -=================================================================== ---- doc/configuration.xml (revision 2356) -+++ doc/configuration.xml (revision 2357) -@@ -45,6 +45,12 @@ - </description> - </boolean> - -+ <list id="global-namespace-cleanup-skip" name="namespace-cleanup-skip"> -+ <description> -+List of paths to skip during namespace cleanup. -+ </description> -+ </list> -+ - <link name="run.rev"> - <description> - Path of the vserver run reverse directory. This directory contains -@@ -381,6 +387,14 @@ - </description> - </boolean> - -+ <list name="namespace-cleanup-skip"> -+ <description> -+List of paths to skip during namespace cleanup. This overrides the -+<optionref ref="global-namespace-cleanup-skip">global namespace-cleanup-skip</optionref> -+file. -+ </description> -+ </list> -+ - <hash name="schedule"> - <description> - [experimental; name is subject of possible change] Contains the diff --git a/util-vserver/patches/0.30.211-r1/030_all_gentoo-wrapper.patch b/util-vserver/patches/0.30.211-r1/030_all_gentoo-wrapper.patch deleted file mode 100644 index 349f03a..0000000 --- a/util-vserver/patches/0.30.211-r1/030_all_gentoo-wrapper.patch +++ /dev/null @@ -1,350 +0,0 @@ -Index: scripts/vupdateworld -=================================================================== ---- scripts/vupdateworld (revision 0) -+++ scripts/vupdateworld (revision 2370) -@@ -0,0 +1,73 @@ -+#!/bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} -+test -e "$UTIL_VSERVER_VARS" || { -+ echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 -+ exit 1 -+} -+. "$UTIL_VSERVER_VARS" -+. "$_LIB_FUNCTIONS" -+ -+ -+function showHelp() -+{ -+ echo \ -+$"Usage: $0 <vserver-name>* [--all] -- <params>+ -+ -+Report bugs to <$PACKAGE_BUGREPORT>." -+ exit 0 -+} -+ -+function showVersion() -+{ -+ echo \ -+$"vupdateworld $PACKAGE_VERSION -- emerge world for vservers -+This program is part of $PACKAGE_STRING -+ -+Copyright (C) 2006 Benedikt Boehm -+This program is free software; you may redistribute it under the terms of -+the GNU General Public License. This program has absolutely no warranty." -+ exit 0 -+} -+ -+tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+declare -a send_through vsomething_opts -+ -+while true; do -+ case "$1" in -+ (--help) showHelp $0 ;; -+ (--version) showVersion ;; -+ (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; -+ (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; -+ (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; -+ (--) shift; break;; -+ (*) echo $"vemerge: internal error; arg=='$1'" >&2; exit 1;; -+ esac -+ shift -+done -+ -+VSOMETHING_TITLE=vemerge -+VSOMETHING_PKGMGMT=1 -+ -+export VSOMETHING_TITLE VSOMETHING_PKGMGMT -+ -+test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- ) -+exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" --update --deep --newuse "$@" -Index: scripts/vemerge -=================================================================== ---- scripts/vemerge (revision 0) -+++ scripts/vemerge (revision 2370) -@@ -0,0 +1,73 @@ -+#!/bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} -+test -e "$UTIL_VSERVER_VARS" || { -+ echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 -+ exit 1 -+} -+. "$UTIL_VSERVER_VARS" -+. "$_LIB_FUNCTIONS" -+ -+ -+function showHelp() -+{ -+ echo \ -+$"Usage: $0 <vserver-name>* [--all] -- <params>+ -+ -+Report bugs to <$PACKAGE_BUGREPORT>." -+ exit 0 -+} -+ -+function showVersion() -+{ -+ echo \ -+$"vemerge $PACKAGE_VERSION -- emerge for vservers -+This program is part of $PACKAGE_STRING -+ -+Copyright (C) 2006 Benedikt Boehm -+This program is free software; you may redistribute it under the terms of -+the GNU General Public License. This program has absolutely no warranty." -+ exit 0 -+} -+ -+tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+declare -a send_through vsomething_opts -+ -+while true; do -+ case "$1" in -+ (--help) showHelp $0 ;; -+ (--version) showVersion ;; -+ (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; -+ (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; -+ (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; -+ (--) shift; break;; -+ (*) echo $"vemerge: internal error; arg=='$1'" >&2; exit 1;; -+ esac -+ shift -+done -+ -+VSOMETHING_TITLE=vemerge -+VSOMETHING_PKGMGMT=1 -+ -+export VSOMETHING_TITLE VSOMETHING_PKGMGMT -+ -+test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- ) -+exec $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" "$@" -Index: scripts/vdispatch-conf -=================================================================== ---- scripts/vdispatch-conf (revision 0) -+++ scripts/vdispatch-conf (revision 2370) -@@ -0,0 +1,72 @@ -+#!/bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} -+test -e "$UTIL_VSERVER_VARS" || { -+ echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 -+ exit 1 -+} -+. "$UTIL_VSERVER_VARS" -+. "$_LIB_FUNCTIONS" -+ -+ -+function showHelp() -+{ -+ echo \ -+$"Usage: $0 <vserver-name>* [--all] -- <params>+ -+ -+Report bugs to <$PACKAGE_BUGREPORT>." -+ exit 0 -+} -+ -+function showVersion() -+{ -+ echo \ -+$"vdispatch-conf $PACKAGE_VERSION -- dispatch-conf for vservers -+This program is part of $PACKAGE_STRING -+ -+Copyright (C) 2006 Benedikt Boehm -+This program is free software; you may redistribute it under the terms of -+the GNU General Public License. This program has absolutely no warranty." -+ exit 0 -+} -+ -+tmp=$(getopt -o +q --long help,version,debug,quiet,all -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+declare -a send_through vsomething_opts -+ -+while true; do -+ case "$1" in -+ (--help) showHelp $0 ;; -+ (--version) showVersion ;; -+ (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; -+ (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; -+ (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; -+ (--) shift; break;; -+ (*) echo $"vdispatch-conf: internal error; arg=='$1'" >&2; exit 1;; -+ esac -+ shift -+done -+ -+VSOMETHING_TITLE=vemerge -+VSOMETHING_PKGMGMT=1 -+ -+export VSOMETHING_TITLE VSOMETHING_PKGMGMT -+ -+exec $_VSOMETHING "${send_through[@]}" dispatch-conf "${vsomething_opts[@]}" -Index: scripts/vesync -=================================================================== ---- scripts/vesync (revision 0) -+++ scripts/vesync (revision 2370) -@@ -0,0 +1,91 @@ -+#!/bin/bash -+# $Id$ -+ -+# Copyright (C) 2006 Benedikt Boehm <hollow@gentoo.org> -+# -+# 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; version 2 of the License. -+# -+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} -+test -e "$UTIL_VSERVER_VARS" || { -+ echo $"Can not find util-vserver installation (the file '$UTIL_VSERVER_VARS' would be expected); aborting..." >&2 -+ exit 1 -+} -+. "$UTIL_VSERVER_VARS" -+. "$_LIB_FUNCTIONS" -+ -+ -+function showHelp() -+{ -+ echo \ -+$"Usage: $0 <vserver-name>* [--all] [--overlay <dir>] [--overlay-host <rsyncpath>] [--overlay-only] -+ -+Report bugs to <$PACKAGE_BUGREPORT>." -+ exit 0 -+} -+ -+function showVersion() -+{ -+ echo \ -+$"vesync $PACKAGE_VERSION -- portage cache sync for vservers -+This program is part of $PACKAGE_STRING -+ -+Copyright (C) 2006 Benedikt Boehm -+This program is free software; you may redistribute it under the terms of -+the GNU General Public License. This program has absolutely no warranty." -+ exit 0 -+} -+ -+tmp=$(getopt -o +q --long help,version,debug,quiet,all,overlay,overlay-host,overlay-only -n "$0" -- "$@") || exit 1 -+eval set -- "$tmp" -+ -+declare -a send_through vsomething_opts -+overlay= -+overlay_host= -+overlay_only=0 -+ -+while true; do -+ case "$1" in -+ (--help) showHelp $0 ;; -+ (--version) showVersion ;; -+ (--debug) send_through=( "${send_through[@]}" "$1" ); set -x;; -+ (--quiet|-q) send_through=( "${send_through[@]}" "$1" );; -+ (--all) vsomething_opts=( "${vsomething_opts[@]}" "$1" );; -+ (--overlay) overlay="${2%/}";; -+ (--overlay-host) overlay_host="${2%/}";; -+ (--overlay-only) overlay_only=1;; -+ (--) shift; break;; -+ (*) echo $"vesync: internal error; arg=='$1'" >&2; exit 1;; -+ esac -+ shift -+done -+ -+VSOMETHING_TITLE=vesync -+VSOMETHING_PKGMGMT=1 -+ -+export VSOMETHING_TITLE VSOMETHING_PKGMGMT -+ -+test ${#vsomething_opts[@]} -eq 0 || vsomething_opts=( "${vsomething_opts[@]}" -- ) -+ -+ret=0 -+ -+test $overlay_only -eq 0 && \ -+ $_VSOMETHING "${send_through[@]}" emerge "${vsomething_opts[@]}" --metadata -+ -+ret=$? -+ -+test -n "$overlay" -a -n "$overlay_host" && \ -+ $_VSOMETHING "${send_through[@]}" rsync "${vsomething_opts[@]}" \ -+ -rtW --progress --delete --delete-after "${overlay_host}/" "${overlay}/" -+ -+test $? -eq 0 -a $ret -eq 0 -Index: scripts/Makefile-files -=================================================================== ---- scripts/Makefile-files (revision 2354) -+++ scripts/Makefile-files (revision 2370) -@@ -84,11 +84,15 @@ - - scripts_sbin_src_PRGS = scripts/chcontext \ - scripts/vapt-get \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ - scripts/vpstree \ - scripts/vrpm \ - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -+ scripts/vupdateworld \ - scripts/vyum - - scripts_sbin_gen_PRGS = - diff --git a/util-vserver/patches/0.30.211-r1/035_all_optional-vlogin.patch b/util-vserver/patches/0.30.211-r1/035_all_optional-vlogin.patch deleted file mode 100644 index 5a28c46..0000000 --- a/util-vserver/patches/0.30.211-r1/035_all_optional-vlogin.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: scripts/vserver -=================================================================== ---- scripts/vserver (revision 2367) -+++ scripts/vserver (revision 2368) -@@ -227,7 +227,8 @@ - suexec 0 chkconfig "$@" - ;; - (enter) -- OPTS_VCONTEXT_ENTER=( "${OPTS_VCONTEXT_ENTER[@]}" --vlogin ) -+ useVlogin && \ -+ OPTS_VCONTEXT_ENTER=( "${OPTS_VCONTEXT_ENTER[@]}" --vlogin ) - getEnterShell "$VSERVER_DIR" - suexec 0 "${ENTER_SHELL[@]}" - ;; -Index: scripts/functions -=================================================================== ---- scripts/functions (revision 2367) -+++ scripts/functions (revision 2368) -@@ -711,6 +711,11 @@ - #$_VKILL -s CONT --xid "$1" 1 &>/dev/null || : - } - -+function useVlogin -+{ -+ test ! -e "$__CONFDIR/.defaults/apps/vlogin/disable" -+} -+ - ## Usage: pkgmgmt.guessStyle <vserver> <resultvar> - function pkgmgmt.guessStyle() - { -Index: doc/configuration.xml -=================================================================== ---- doc/configuration.xml (revision 2367) -+++ doc/configuration.xml (revision 2368) -@@ -196,6 +196,14 @@ - </boolean> - - </collection> -+ -+ <collection name="vlogin"> -+ <boolean id="vlogin-disable" name="disable" since="0.30.212"> -+ <description> -+When this file exists, vlogin isn't used on vserver <guest> enter. -+ </description> -+ </boolean> -+ </collection> - </collection> - - <collection name="interfaces" use="optional"> diff --git a/util-vserver/patches/0.30.211-r1/040_all_kernel-headers.patch b/util-vserver/patches/0.30.211-r1/040_all_kernel-headers.patch deleted file mode 100644 index 06a3fbf..0000000 --- a/util-vserver/patches/0.30.211-r1/040_all_kernel-headers.patch +++ /dev/null @@ -1,2577 +0,0 @@ -Index: kernel/xid.h -=================================================================== ---- kernel/xid.h (revision 2366) -+++ kernel/xid.h (revision 2369) -@@ -1,146 +0,0 @@ --#ifndef _VX_XID_H --#define _VX_XID_H -- --#include <linux/config.h> -- -- --#define XID_TAG(in) (IS_TAGXID(in)) -- -- --#ifdef CONFIG_XID_TAG_NFSD --#define XID_TAG_NFSD 1 --#else --#define XID_TAG_NFSD 0 --#endif -- -- --#ifdef CONFIG_INOXID_NONE -- --#define MAX_UID 0xFFFFFFFF --#define MAX_GID 0xFFFFFFFF -- --#define INOXID_XID(tag, uid, gid, xid) (0) -- --#define XIDINO_UID(tag, uid, xid) (uid) --#define XIDINO_GID(tag, gid, xid) (gid) -- --#endif -- -- --#ifdef CONFIG_INOXID_GID16 -- --#define MAX_UID 0xFFFFFFFF --#define MAX_GID 0x0000FFFF -- --#define INOXID_XID(tag, uid, gid, xid) \ -- ((tag) ? (((gid) >> 16) & 0xFFFF) : 0) -- --#define XIDINO_UID(tag, uid, xid) (uid) --#define XIDINO_GID(tag, gid, xid) \ -- ((tag) ? (((gid) & 0xFFFF) | ((xid) << 16)) : (gid)) -- --#endif -- -- --#ifdef CONFIG_INOXID_UGID24 -- --#define MAX_UID 0x00FFFFFF --#define MAX_GID 0x00FFFFFF -- --#define INOXID_XID(tag, uid, gid, xid) \ -- ((tag) ? ((((uid) >> 16) & 0xFF00) | (((gid) >> 24) & 0xFF)) : 0) -- --#define XIDINO_UID(tag, uid, xid) \ -- ((tag) ? (((uid) & 0xFFFFFF) | (((xid) & 0xFF00) << 16)) : (uid)) --#define XIDINO_GID(tag, gid, xid) \ -- ((tag) ? (((gid) & 0xFFFFFF) | (((xid) & 0x00FF) << 24)) : (gid)) -- --#endif -- -- --#ifdef CONFIG_INOXID_UID16 -- --#define MAX_UID 0x0000FFFF --#define MAX_GID 0xFFFFFFFF -- --#define INOXID_XID(tag, uid, gid, xid) \ -- ((tag) ? (((uid) >> 16) & 0xFFFF) : 0) -- --#define XIDINO_UID(tag, uid, xid) \ -- ((tag) ? (((uid) & 0xFFFF) | ((xid) << 16)) : (uid)) --#define XIDINO_GID(tag, gid, xid) (gid) -- --#endif -- -- --#ifdef CONFIG_INOXID_INTERN -- --#define MAX_UID 0xFFFFFFFF --#define MAX_GID 0xFFFFFFFF -- --#define INOXID_XID(tag, uid, gid, xid) \ -- ((tag) ? (xid) : 0) -- --#define XIDINO_UID(tag, uid, xid) (uid) --#define XIDINO_GID(tag, gid, xid) (gid) -- --#endif -- -- --#ifdef CONFIG_INOXID_RUNTIME -- --#define MAX_UID 0xFFFFFFFF --#define MAX_GID 0xFFFFFFFF -- --#define INOXID_XID(tag, uid, gid, xid) (0) -- --#define XIDINO_UID(tag, uid, xid) (uid) --#define XIDINO_GID(tag, gid, xid) (gid) -- --#endif -- -- --#ifndef CONFIG_INOXID_NONE --#define vx_current_fsxid(sb) \ -- ((sb)->s_flags & MS_TAGXID ? current->xid : 0) --#else --#define vx_current_fsxid(sb) (0) --#endif -- --#ifndef CONFIG_INOXID_INTERN --#define XIDINO_XID(tag, xid) (0) --#else --#define XIDINO_XID(tag, xid) ((tag) ? (xid) : 0) --#endif -- --#define INOXID_UID(tag, uid, gid) \ -- ((tag) ? ((uid) & MAX_UID) : (uid)) --#define INOXID_GID(tag, uid, gid) \ -- ((tag) ? ((gid) & MAX_GID) : (gid)) -- -- --static inline uid_t vx_map_uid(uid_t uid) --{ -- if ((uid > MAX_UID) && (uid != -1)) -- uid = -2; -- return (uid & MAX_UID); --} -- --static inline gid_t vx_map_gid(gid_t gid) --{ -- if ((gid > MAX_GID) && (gid != -1)) -- gid = -2; -- return (gid & MAX_GID); --} -- -- --#ifdef CONFIG_VSERVER_LEGACY --#define FIOC_GETXID _IOR('x', 1, long) --#define FIOC_SETXID _IOW('x', 2, long) --#define FIOC_SETXIDJ _IOW('x', 3, long) --#endif -- --int vx_parse_xid(char *string, xid_t *xid, int remove); --void vx_propagate_xid(struct nameidata *nd, struct inode *inode); -- --#endif /* _VX_XID_H */ -Index: kernel/limit_def.h -=================================================================== ---- kernel/limit_def.h (revision 2366) -+++ kernel/limit_def.h (revision 2369) -@@ -7,16 +7,41 @@ - #include "limit.h" - - -+struct _vx_res_limit { -+ rlim_t soft; /* Context soft limit */ -+ rlim_t hard; /* Context hard limit */ -+ -+ rlim_atomic_t rcur; /* Current value */ -+ rlim_t rmin; /* Context minimum */ -+ rlim_t rmax; /* Context maximum */ -+ -+ atomic_t lhit; /* Limit hits */ -+}; -+ - /* context sub struct */ - - struct _vx_limit { -- atomic_t ticks; -- -- unsigned long rlim[NUM_LIMITS]; /* Context limit */ -- unsigned long rmax[NUM_LIMITS]; /* Context maximum */ -- atomic_t rcur[NUM_LIMITS]; /* Current value */ -- atomic_t lhit[NUM_LIMITS]; /* Limit hits */ -+ struct _vx_res_limit res[NUM_LIMITS]; - }; - -+#ifdef CONFIG_VSERVER_DEBUG - -+static inline void __dump_vx_limit(struct _vx_limit *limit) -+{ -+ int i; -+ -+ printk("\t_vx_limit:"); -+ for (i=0; i<NUM_LIMITS; i++) { -+ printk("\t [%2d] = %8lu %8lu/%8lu, %8ld/%8ld, %8d\n", -+ i, (unsigned long)__rlim_get(limit, i), -+ (unsigned long)__rlim_rmin(limit, i), -+ (unsigned long)__rlim_rmax(limit, i), -+ (long)__rlim_soft(limit, i), -+ (long)__rlim_hard(limit, i), -+ atomic_read(&__rlim_lhit(limit, i))); -+ } -+} -+ -+#endif -+ - #endif /* _VX_LIMIT_DEF_H */ -Index: kernel/signal_cmd.h -=================================================================== ---- kernel/signal_cmd.h (revision 2366) -+++ kernel/signal_cmd.h (revision 2369) -@@ -19,8 +19,25 @@ - - #ifdef __KERNEL__ - --extern int vc_ctx_kill(uint32_t, void __user *); --extern int vc_wait_exit(uint32_t, void __user *); -+extern int vc_ctx_kill(struct vx_info *, void __user *); -+extern int vc_wait_exit(struct vx_info *, void __user *); - - #endif /* __KERNEL__ */ -+ -+/* process alteration commands */ -+ -+#define VCMD_get_pflags VC_CMD(PROCALT, 1, 0) -+#define VCMD_set_pflags VC_CMD(PROCALT, 2, 0) -+ -+struct vcmd_pflags_v0 { -+ uint32_t flagword; -+ uint32_t mask; -+}; -+ -+#ifdef __KERNEL__ -+ -+extern int vc_get_pflags(uint32_t pid, void __user *); -+extern int vc_set_pflags(uint32_t pid, void __user *); -+ -+#endif /* __KERNEL__ */ - #endif /* _VX_SIGNAL_CMD_H */ -Index: kernel/limit_cmd.h -=================================================================== ---- kernel/limit_cmd.h (revision 2366) -+++ kernel/limit_cmd.h (revision 2369) -@@ -7,6 +7,7 @@ - #define VCMD_get_rlimit VC_CMD(RLIMIT, 1, 0) - #define VCMD_set_rlimit VC_CMD(RLIMIT, 2, 0) - #define VCMD_get_rlimit_mask VC_CMD(RLIMIT, 3, 0) -+#define VCMD_reset_minmax VC_CMD(RLIMIT, 9, 0) - - struct vcmd_ctx_rlimit_v0 { - uint32_t id; -@@ -21,6 +22,16 @@ - uint32_t maximum; - }; - -+#define VCMD_rlimit_stat VC_CMD(VSTAT, 1, 0) -+ -+struct vcmd_rlimit_stat_v0 { -+ uint32_t id; -+ uint32_t hits; -+ uint64_t value; -+ uint64_t minimum; -+ uint64_t maximum; -+}; -+ - #define CRLIM_UNSET (0ULL) - #define CRLIM_INFINITY (~0ULL) - #define CRLIM_KEEP (~1ULL) -@@ -40,14 +51,17 @@ - - #include <linux/compiler.h> - --extern int vc_get_rlimit(uint32_t, void __user *); --extern int vc_set_rlimit(uint32_t, void __user *); - extern int vc_get_rlimit_mask(uint32_t, void __user *); -+extern int vc_get_rlimit(struct vx_info *, void __user *); -+extern int vc_set_rlimit(struct vx_info *, void __user *); -+extern int vc_reset_minmax(struct vx_info *, void __user *); - -+extern int vc_rlimit_stat(struct vx_info *, void __user *); -+ - #ifdef CONFIG_IA32_EMULATION - --extern int vc_get_rlimit_x32(uint32_t, void __user *); --extern int vc_set_rlimit_x32(uint32_t, void __user *); -+extern int vc_get_rlimit_x32(struct vx_info *, void __user *); -+extern int vc_set_rlimit_x32(struct vx_info *, void __user *); - - #endif /* CONFIG_IA32_EMULATION */ - -Index: kernel/history.h -=================================================================== ---- kernel/history.h (revision 0) -+++ kernel/history.h (revision 2369) -@@ -0,0 +1,197 @@ -+#ifndef _VX_HISTORY_H -+#define _VX_HISTORY_H -+ -+ -+enum { -+ VXH_UNUSED=0, -+ VXH_THROW_OOPS=1, -+ -+ VXH_GET_VX_INFO, -+ VXH_PUT_VX_INFO, -+ VXH_INIT_VX_INFO, -+ VXH_SET_VX_INFO, -+ VXH_CLR_VX_INFO, -+ VXH_CLAIM_VX_INFO, -+ VXH_RELEASE_VX_INFO, -+ VXH_ALLOC_VX_INFO, -+ VXH_DEALLOC_VX_INFO, -+ VXH_HASH_VX_INFO, -+ VXH_UNHASH_VX_INFO, -+ VXH_LOC_VX_INFO, -+ VXH_LOOKUP_VX_INFO, -+ VXH_CREATE_VX_INFO, -+}; -+ -+struct _vxhe_vxi { -+ struct vx_info *ptr; -+ unsigned xid; -+ unsigned usecnt; -+ unsigned tasks; -+}; -+ -+struct _vxhe_set_clr { -+ void *data; -+}; -+ -+struct _vxhe_loc_lookup { -+ unsigned arg; -+}; -+ -+struct _vx_hist_entry { -+ void *loc; -+ unsigned short seq; -+ unsigned short type; -+ struct _vxhe_vxi vxi; -+ union { -+ struct _vxhe_set_clr sc; -+ struct _vxhe_loc_lookup ll; -+ }; -+}; -+ -+#ifdef CONFIG_VSERVER_HISTORY -+ -+extern unsigned volatile int vxh_active; -+ -+struct _vx_hist_entry *vxh_advance(void *loc); -+ -+ -+static inline -+void __vxh_copy_vxi(struct _vx_hist_entry *entry, struct vx_info *vxi) -+{ -+ entry->vxi.ptr = vxi; -+ if (vxi) { -+ entry->vxi.usecnt = atomic_read(&vxi->vx_usecnt); -+ entry->vxi.tasks = atomic_read(&vxi->vx_tasks); -+ entry->vxi.xid = vxi->vx_id; -+ } -+} -+ -+ -+#define __HERE__ current_text_addr() -+ -+#define __VXH_BODY(__type, __data, __here) \ -+ struct _vx_hist_entry *entry; \ -+ \ -+ preempt_disable(); \ -+ entry = vxh_advance(__here); \ -+ __data; \ -+ entry->type = __type; \ -+ preempt_enable(); -+ -+ -+ /* pass vxi only */ -+ -+#define __VXH_SMPL \ -+ __vxh_copy_vxi(entry, vxi) -+ -+static inline -+void __vxh_smpl(struct vx_info *vxi, int __type, void *__here) -+{ -+ __VXH_BODY(__type, __VXH_SMPL, __here) -+} -+ -+ /* pass vxi and data (void *) */ -+ -+#define __VXH_DATA \ -+ __vxh_copy_vxi(entry, vxi); \ -+ entry->sc.data = data -+ -+static inline -+void __vxh_data(struct vx_info *vxi, void *data, -+ int __type, void *__here) -+{ -+ __VXH_BODY(__type, __VXH_DATA, __here) -+} -+ -+ /* pass vxi and arg (long) */ -+ -+#define __VXH_LONG \ -+ __vxh_copy_vxi(entry, vxi); \ -+ entry->ll.arg = arg -+ -+static inline -+void __vxh_long(struct vx_info *vxi, long arg, -+ int __type, void *__here) -+{ -+ __VXH_BODY(__type, __VXH_LONG, __here) -+} -+ -+ -+static inline -+void __vxh_throw_oops(void *__here) -+{ -+ __VXH_BODY(VXH_THROW_OOPS, {}, __here); -+ /* prevent further acquisition */ -+ vxh_active = 0; -+} -+ -+ -+#define vxh_throw_oops() __vxh_throw_oops(__HERE__); -+ -+#define __vxh_get_vx_info(v,h) __vxh_smpl(v, VXH_GET_VX_INFO, h); -+#define __vxh_put_vx_info(v,h) __vxh_smpl(v, VXH_PUT_VX_INFO, h); -+ -+#define __vxh_init_vx_info(v,d,h) \ -+ __vxh_data(v,d, VXH_INIT_VX_INFO, h); -+#define __vxh_set_vx_info(v,d,h) \ -+ __vxh_data(v,d, VXH_SET_VX_INFO, h); -+#define __vxh_clr_vx_info(v,d,h) \ -+ __vxh_data(v,d, VXH_CLR_VX_INFO, h); -+ -+#define __vxh_claim_vx_info(v,d,h) \ -+ __vxh_data(v,d, VXH_CLAIM_VX_INFO, h); -+#define __vxh_release_vx_info(v,d,h) \ -+ __vxh_data(v,d, VXH_RELEASE_VX_INFO, h); -+ -+#define vxh_alloc_vx_info(v) \ -+ __vxh_smpl(v, VXH_ALLOC_VX_INFO, __HERE__); -+#define vxh_dealloc_vx_info(v) \ -+ __vxh_smpl(v, VXH_DEALLOC_VX_INFO, __HERE__); -+ -+#define vxh_hash_vx_info(v) \ -+ __vxh_smpl(v, VXH_HASH_VX_INFO, __HERE__); -+#define vxh_unhash_vx_info(v) \ -+ __vxh_smpl(v, VXH_UNHASH_VX_INFO, __HERE__); -+ -+#define vxh_loc_vx_info(v,l) \ -+ __vxh_long(v,l, VXH_LOC_VX_INFO, __HERE__); -+#define vxh_lookup_vx_info(v,l) \ -+ __vxh_long(v,l, VXH_LOOKUP_VX_INFO, __HERE__); -+#define vxh_create_vx_info(v,l) \ -+ __vxh_long(v,l, VXH_CREATE_VX_INFO, __HERE__); -+ -+extern void vxh_dump_history(void); -+ -+ -+#else /* CONFIG_VSERVER_HISTORY */ -+ -+#define __HERE__ 0 -+ -+#define vxh_throw_oops() do { } while (0) -+ -+#define __vxh_get_vx_info(v,h) do { } while (0) -+#define __vxh_put_vx_info(v,h) do { } while (0) -+ -+#define __vxh_init_vx_info(v,d,h) do { } while (0) -+#define __vxh_set_vx_info(v,d,h) do { } while (0) -+#define __vxh_clr_vx_info(v,d,h) do { } while (0) -+ -+#define __vxh_claim_vx_info(v,d,h) do { } while (0) -+#define __vxh_release_vx_info(v,d,h) do { } while (0) -+ -+#define vxh_alloc_vx_info(v) do { } while (0) -+#define vxh_dealloc_vx_info(v) do { } while (0) -+ -+#define vxh_hash_vx_info(v) do { } while (0) -+#define vxh_unhash_vx_info(v) do { } while (0) -+ -+#define vxh_loc_vx_info(a,v) do { } while (0) -+#define vxh_lookup_vx_info(a,v) do { } while (0) -+#define vxh_create_vx_info(a,v) do { } while (0) -+ -+#define vxh_dump_history() do { } while (0) -+ -+ -+#endif /* CONFIG_VSERVER_HISTORY */ -+ -+#endif /* _VX_HISTORY_H */ -Index: kernel/switch.h -=================================================================== ---- kernel/switch.h (revision 2366) -+++ kernel/switch.h (revision 2369) -@@ -34,7 +34,7 @@ - DISK | | | | |DLIMIT | | |INODE | | - VFS | 32| 33| 34| 35| 36| 37| | 38| 39| - -------+-------+-------+-------+-------+-------+-------+ +-------+-------+ -- OTHER | | | | | | | |VINFO | | -+ OTHER |VSTAT | | | | | | |VINFO | | - | 40| 41| 42| 43| 44| 45| | 46| 47| - =======+=======+=======+=======+=======+=======+=======+ +=======+=======+ - SPECIAL|EVENT | | | |FLAGS | | | | | -@@ -66,6 +66,7 @@ - #define VC_CAT_DLIMIT 36 - #define VC_CAT_INODE 38 - -+#define VC_CAT_VSTAT 40 - #define VC_CAT_VINFO 46 - #define VC_CAT_EVENT 48 - -@@ -78,12 +79,13 @@ - - /* interface version */ - --#define VCI_VERSION 0x00020002 -+#define VCI_VERSION 0x00020102 - #define VCI_LEGACY_VERSION 0x000100FF - - /* query version */ - - #define VCMD_get_version VC_CMD(VERSION, 0, 0) -+#define VCMD_get_vci VC_CMD(VERSION, 1, 0) - - - #ifdef __KERNEL__ -Index: kernel/cvirt_def.h -=================================================================== ---- kernel/cvirt_def.h (revision 2366) -+++ kernel/cvirt_def.h (revision 2369) -@@ -35,7 +35,7 @@ - /* context sub struct */ - - struct _vx_cvirt { -- int max_threads; /* maximum allowed threads */ -+// int max_threads; /* maximum allowed threads */ - atomic_t nr_threads; /* number of current threads */ - atomic_t nr_running; /* number of running threads */ - atomic_t nr_uninterruptible; /* number of uninterruptible threads */ -@@ -43,6 +43,7 @@ - atomic_t nr_onhold; /* processes on hold */ - uint32_t onhold_last; /* jiffies when put on hold */ - -+ struct timeval bias_tv; /* time offset to the host */ - struct timespec bias_idle; - struct timespec bias_uptime; /* context creation point */ - uint64_t bias_clock; /* offset in clock_t */ -@@ -51,27 +52,33 @@ - - spinlock_t load_lock; /* lock for the load averages */ - atomic_t load_updates; /* nr of load updates done so far */ -- uint32_t load_last; /* last time load was cacled */ -+ uint32_t load_last; /* last time load was calculated */ - uint32_t load[3]; /* load averages 1,5,15 */ - - atomic_t total_forks; /* number of forks so far */ - -- struct _vx_usage_stat cpustat[NR_CPUS]; -- - struct _vx_syslog syslog; - }; - --struct _vx_sock_acc { -- atomic_t count; -- atomic_t total; -+struct _vx_cvirt_pc { -+ struct _vx_usage_stat cpustat; - }; - --/* context sub struct */ - --struct _vx_cacct { -- unsigned long total_forks; -+#ifdef CONFIG_VSERVER_DEBUG - -- struct _vx_sock_acc sock[5][3]; --}; -+static inline void __dump_vx_cvirt(struct _vx_cvirt *cvirt) -+{ -+ printk("\t_vx_cvirt:\n"); -+ printk("\t threads: %4d, %4d, %4d, %4d\n", -+ atomic_read(&cvirt->nr_threads), -+ atomic_read(&cvirt->nr_running), -+ atomic_read(&cvirt->nr_uninterruptible), -+ atomic_read(&cvirt->nr_onhold)); -+ /* add rest here */ -+ printk("\t total_forks = %d\n", atomic_read(&cvirt->total_forks)); -+} - -+#endif -+ - #endif /* _VX_CVIRT_DEF_H */ -Index: kernel/context_cmd.h -=================================================================== ---- kernel/context_cmd.h (revision 2366) -+++ kernel/context_cmd.h (revision 2369) -@@ -20,11 +20,23 @@ - }; - - #ifdef __KERNEL__ --extern int vc_vx_info(uint32_t, void __user *); -+extern int vc_vx_info(struct vx_info *, void __user *); - - #endif /* __KERNEL__ */ - -+#define VCMD_ctx_stat VC_CMD(VSTAT, 0, 0) - -+struct vcmd_ctx_stat_v0 { -+ uint32_t usecnt; -+ uint32_t tasks; -+ /* more to come */ -+}; -+ -+#ifdef __KERNEL__ -+extern int vc_ctx_stat(struct vx_info *, void __user *); -+ -+#endif /* __KERNEL__ */ -+ - /* context commands */ - - #define VCMD_ctx_create_v0 VC_CMD(VPROC, 1, 0) -@@ -43,7 +55,7 @@ - - #ifdef __KERNEL__ - extern int vc_ctx_create(uint32_t, void __user *); --extern int vc_ctx_migrate(uint32_t, void __user *); -+extern int vc_ctx_migrate(struct vx_info *, void __user *); - - #endif /* __KERNEL__ */ - -@@ -59,16 +71,16 @@ - }; - - #ifdef __KERNEL__ --extern int vc_get_cflags(uint32_t, void __user *); --extern int vc_set_cflags(uint32_t, void __user *); -+extern int vc_get_cflags(struct vx_info *, void __user *); -+extern int vc_set_cflags(struct vx_info *, void __user *); - - #endif /* __KERNEL__ */ - - - /* context caps commands */ - --#define VCMD_get_ccaps VC_CMD(FLAGS, 3, 0) --#define VCMD_set_ccaps VC_CMD(FLAGS, 4, 0) -+#define VCMD_get_ccaps_v0 VC_CMD(FLAGS, 3, 0) -+#define VCMD_set_ccaps_v0 VC_CMD(FLAGS, 4, 0) - - struct vcmd_ctx_caps_v0 { - uint64_t bcaps; -@@ -76,9 +88,36 @@ - uint64_t cmask; - }; - -+#define VCMD_get_ccaps VC_CMD(FLAGS, 3, 1) -+#define VCMD_set_ccaps VC_CMD(FLAGS, 4, 1) -+ -+struct vcmd_ctx_caps_v1 { -+ uint64_t ccaps; -+ uint64_t cmask; -+}; -+ - #ifdef __KERNEL__ --extern int vc_get_ccaps(uint32_t, void __user *); --extern int vc_set_ccaps(uint32_t, void __user *); -+extern int vc_get_ccaps_v0(struct vx_info *, void __user *); -+extern int vc_set_ccaps_v0(struct vx_info *, void __user *); -+extern int vc_get_ccaps(struct vx_info *, void __user *); -+extern int vc_set_ccaps(struct vx_info *, void __user *); - - #endif /* __KERNEL__ */ -+ -+ -+/* bcaps commands */ -+ -+#define VCMD_get_bcaps VC_CMD(FLAGS, 9, 0) -+#define VCMD_set_bcaps VC_CMD(FLAGS,10, 0) -+ -+struct vcmd_bcaps { -+ uint64_t bcaps; -+ uint64_t bmask; -+}; -+ -+#ifdef __KERNEL__ -+extern int vc_get_bcaps(struct vx_info *, void __user *); -+extern int vc_set_bcaps(struct vx_info *, void __user *); -+ -+#endif /* __KERNEL__ */ - #endif /* _VX_CONTEXT_CMD_H */ -Index: kernel/cvirt_cmd.h -=================================================================== ---- kernel/cvirt_cmd.h (revision 2366) -+++ kernel/cvirt_cmd.h (revision 2369) -@@ -28,8 +28,26 @@ - - #include <linux/compiler.h> - --extern int vc_set_vhi_name(uint32_t, void __user *); --extern int vc_get_vhi_name(uint32_t, void __user *); -+extern int vc_set_vhi_name(struct vx_info *, void __user *); -+extern int vc_get_vhi_name(struct vx_info *, void __user *); - - #endif /* __KERNEL__ */ -+ -+#define VCMD_virt_stat VC_CMD(VSTAT, 3, 0) -+ -+struct vcmd_virt_stat_v0 { -+ uint64_t offset; -+ uint64_t uptime; -+ uint32_t nr_threads; -+ uint32_t nr_running; -+ uint32_t nr_uninterruptible; -+ uint32_t nr_onhold; -+ uint32_t nr_forks; -+ uint32_t load[3]; -+}; -+ -+#ifdef __KERNEL__ -+extern int vc_virt_stat(struct vx_info *, void __user *); -+ -+#endif /* __KERNEL__ */ - #endif /* _VX_CVIRT_CMD_H */ -Index: kernel/cacct.h -=================================================================== ---- kernel/cacct.h (revision 0) -+++ kernel/cacct.h (revision 2369) -@@ -0,0 +1,15 @@ -+#ifndef _VX_CACCT_H -+#define _VX_CACCT_H -+ -+ -+enum sock_acc_field { -+ VXA_SOCK_UNSPEC = 0, -+ VXA_SOCK_UNIX, -+ VXA_SOCK_INET, -+ VXA_SOCK_INET6, -+ VXA_SOCK_PACKET, -+ VXA_SOCK_OTHER, -+ VXA_SOCK_SIZE /* array size */ -+}; -+ -+#endif /* _VX_CACCT_H */ -Index: kernel/dlimit.h -=================================================================== ---- kernel/dlimit.h (revision 2366) -+++ kernel/dlimit.h (revision 2369) -@@ -3,13 +3,13 @@ - - #include "switch.h" - --#define CDLIM_UNSET (0ULL) --#define CDLIM_INFINITY (~0ULL) --#define CDLIM_KEEP (~1ULL) - -- - #ifdef __KERNEL__ - -+/* keep in sync with CDLIM_INFINITY */ -+ -+#define DLIM_INFINITY (~0ULL) -+ - #include <linux/spinlock.h> - - struct super_block; -@@ -17,7 +17,7 @@ - struct dl_info { - struct hlist_node dl_hlist; /* linked list of contexts */ - struct rcu_head dl_rcu; /* the rcu head */ -- xid_t dl_xid; /* context id */ -+ tag_t dl_tag; /* context tag */ - atomic_t dl_usecnt; /* usage count */ - atomic_t dl_refcnt; /* reference count */ - -@@ -25,10 +25,10 @@ - - spinlock_t dl_lock; /* protect the values */ - -- uint64_t dl_space_used; /* used space in bytes */ -- uint64_t dl_space_total; /* maximum space in bytes */ -- uint32_t dl_inodes_used; /* used inodes */ -- uint32_t dl_inodes_total; /* maximum inodes */ -+ unsigned long long dl_space_used; /* used space in bytes */ -+ unsigned long long dl_space_total; /* maximum space in bytes */ -+ unsigned long dl_inodes_used; /* used inodes */ -+ unsigned long dl_inodes_total; /* maximum inodes */ - - unsigned int dl_nrlmult; /* non root limit mult */ - }; -@@ -38,7 +38,7 @@ - extern void rcu_free_dl_info(struct rcu_head *); - extern void unhash_dl_info(struct dl_info *); - --extern struct dl_info *locate_dl_info(struct super_block *, xid_t); -+extern struct dl_info *locate_dl_info(struct super_block *, tag_t); - - - struct kstatfs; -Index: kernel/sched.h -=================================================================== ---- kernel/sched.h (revision 2366) -+++ kernel/sched.h (revision 2369) -@@ -14,12 +14,12 @@ - void vx_update_load(struct vx_info *); - - --struct task_struct; -+int vx_tokens_recalc(struct _vx_sched_pc *, -+ unsigned long *, unsigned long *, int [2]); - --int vx_effective_vavavoom(struct vx_info *, int); -+void vx_update_sched_param(struct _vx_sched *sched, -+ struct _vx_sched_pc *sched_pc); - --int vx_tokens_recalc(struct vx_info *); -- - #endif /* __KERNEL__ */ - #else /* _VX_SCHED_H */ - #warning duplicate inclusion -Index: kernel/debug.h -=================================================================== ---- kernel/debug.h (revision 2366) -+++ kernel/debug.h (revision 2369) -@@ -24,10 +24,12 @@ - extern unsigned int vx_debug_switch; - extern unsigned int vx_debug_xid; - extern unsigned int vx_debug_nid; -+extern unsigned int vx_debug_tag; - extern unsigned int vx_debug_net; - extern unsigned int vx_debug_limit; - extern unsigned int vx_debug_cres; - extern unsigned int vx_debug_dlim; -+extern unsigned int vx_debug_quota; - extern unsigned int vx_debug_cvirt; - extern unsigned int vx_debug_misc; - -@@ -60,6 +62,7 @@ - printk(VX_WARNLEVEL f "\n" , ##x); \ - } while (0) - -+ - #define vxd_path(d,m) \ - ({ static char _buffer[PATH_MAX]; \ - d_path((d), (m), _buffer, sizeof(_buffer)); }) -@@ -67,11 +70,18 @@ - #define vxd_cond_path(n) \ - ((n) ? vxd_path((n)->dentry, (n)->mnt) : "<null>" ) - -+ -+struct vx_info; -+ -+void dump_vx_info(struct vx_info *, int); -+void dump_vx_info_inactive(int); -+ - #else /* CONFIG_VSERVER_DEBUG */ - - #define vx_debug_switch 0 - #define vx_debug_xid 0 - #define vx_debug_nid 0 -+#define vx_debug_tag 0 - #define vx_debug_net 0 - #define vx_debug_limit 0 - #define vx_debug_cres 0 -@@ -89,202 +99,6 @@ - #endif /* CONFIG_VSERVER_DEBUG */ - - --/* history stuff */ -- --#ifdef CONFIG_VSERVER_HISTORY -- -- --extern unsigned volatile int vxh_active; -- --struct _vxhe_vxi { -- struct vx_info *ptr; -- unsigned xid; -- unsigned usecnt; -- unsigned tasks; --}; -- --struct _vxhe_set_clr { -- void *data; --}; -- --struct _vxhe_loc_lookup { -- unsigned arg; --}; -- --enum { -- VXH_UNUSED=0, -- VXH_THROW_OOPS=1, -- -- VXH_GET_VX_INFO, -- VXH_PUT_VX_INFO, -- VXH_INIT_VX_INFO, -- VXH_SET_VX_INFO, -- VXH_CLR_VX_INFO, -- VXH_CLAIM_VX_INFO, -- VXH_RELEASE_VX_INFO, -- VXH_ALLOC_VX_INFO, -- VXH_DEALLOC_VX_INFO, -- VXH_HASH_VX_INFO, -- VXH_UNHASH_VX_INFO, -- VXH_LOC_VX_INFO, -- VXH_LOOKUP_VX_INFO, -- VXH_CREATE_VX_INFO, --}; -- --struct _vx_hist_entry { -- void *loc; -- unsigned short seq; -- unsigned short type; -- struct _vxhe_vxi vxi; -- union { -- struct _vxhe_set_clr sc; -- struct _vxhe_loc_lookup ll; -- }; --}; -- --struct _vx_hist_entry *vxh_advance(void *loc); -- -- --static inline --void __vxh_copy_vxi(struct _vx_hist_entry *entry, struct vx_info *vxi) --{ -- entry->vxi.ptr = vxi; -- if (vxi) { -- entry->vxi.usecnt = atomic_read(&vxi->vx_usecnt); -- entry->vxi.tasks = atomic_read(&vxi->vx_tasks); -- entry->vxi.xid = vxi->vx_id; -- } --} -- -- --#define __HERE__ current_text_addr() -- --#define __VXH_BODY(__type, __data, __here) \ -- struct _vx_hist_entry *entry; \ -- \ -- preempt_disable(); \ -- entry = vxh_advance(__here); \ -- __data; \ -- entry->type = __type; \ -- preempt_enable(); -- -- -- /* pass vxi only */ -- --#define __VXH_SMPL \ -- __vxh_copy_vxi(entry, vxi) -- --static inline --void __vxh_smpl(struct vx_info *vxi, int __type, void *__here) --{ -- __VXH_BODY(__type, __VXH_SMPL, __here) --} -- -- /* pass vxi and data (void *) */ -- --#define __VXH_DATA \ -- __vxh_copy_vxi(entry, vxi); \ -- entry->sc.data = data -- --static inline --void __vxh_data(struct vx_info *vxi, void *data, -- int __type, void *__here) --{ -- __VXH_BODY(__type, __VXH_DATA, __here) --} -- -- /* pass vxi and arg (long) */ -- --#define __VXH_LONG \ -- __vxh_copy_vxi(entry, vxi); \ -- entry->ll.arg = arg -- --static inline --void __vxh_long(struct vx_info *vxi, long arg, -- int __type, void *__here) --{ -- __VXH_BODY(__type, __VXH_LONG, __here) --} -- -- --static inline --void __vxh_throw_oops(void *__here) --{ -- __VXH_BODY(VXH_THROW_OOPS, {}, __here); -- /* prevent further acquisition */ -- vxh_active = 0; --} -- -- --#define vxh_throw_oops() __vxh_throw_oops(__HERE__); -- --#define __vxh_get_vx_info(v,h) __vxh_smpl(v, VXH_GET_VX_INFO, h); --#define __vxh_put_vx_info(v,h) __vxh_smpl(v, VXH_PUT_VX_INFO, h); -- --#define __vxh_init_vx_info(v,d,h) \ -- __vxh_data(v,d, VXH_INIT_VX_INFO, h); --#define __vxh_set_vx_info(v,d,h) \ -- __vxh_data(v,d, VXH_SET_VX_INFO, h); --#define __vxh_clr_vx_info(v,d,h) \ -- __vxh_data(v,d, VXH_CLR_VX_INFO, h); -- --#define __vxh_claim_vx_info(v,d,h) \ -- __vxh_data(v,d, VXH_CLAIM_VX_INFO, h); --#define __vxh_release_vx_info(v,d,h) \ -- __vxh_data(v,d, VXH_RELEASE_VX_INFO, h); -- --#define vxh_alloc_vx_info(v) \ -- __vxh_smpl(v, VXH_ALLOC_VX_INFO, __HERE__); --#define vxh_dealloc_vx_info(v) \ -- __vxh_smpl(v, VXH_DEALLOC_VX_INFO, __HERE__); -- --#define vxh_hash_vx_info(v) \ -- __vxh_smpl(v, VXH_HASH_VX_INFO, __HERE__); --#define vxh_unhash_vx_info(v) \ -- __vxh_smpl(v, VXH_UNHASH_VX_INFO, __HERE__); -- --#define vxh_loc_vx_info(v,l) \ -- __vxh_long(v,l, VXH_LOC_VX_INFO, __HERE__); --#define vxh_lookup_vx_info(v,l) \ -- __vxh_long(v,l, VXH_LOOKUP_VX_INFO, __HERE__); --#define vxh_create_vx_info(v,l) \ -- __vxh_long(v,l, VXH_CREATE_VX_INFO, __HERE__); -- --extern void vxh_dump_history(void); -- -- --#else /* CONFIG_VSERVER_HISTORY */ -- --#define __HERE__ 0 -- --#define vxh_throw_oops() do { } while (0) -- --#define __vxh_get_vx_info(v,h) do { } while (0) --#define __vxh_put_vx_info(v,h) do { } while (0) -- --#define __vxh_init_vx_info(v,d,h) do { } while (0) --#define __vxh_set_vx_info(v,d,h) do { } while (0) --#define __vxh_clr_vx_info(v,d,h) do { } while (0) -- --#define __vxh_claim_vx_info(v,d,h) do { } while (0) --#define __vxh_release_vx_info(v,d,h) do { } while (0) -- --#define vxh_alloc_vx_info(v) do { } while (0) --#define vxh_dealloc_vx_info(v) do { } while (0) -- --#define vxh_hash_vx_info(v) do { } while (0) --#define vxh_unhash_vx_info(v) do { } while (0) -- --#define vxh_loc_vx_info(a,v) do { } while (0) --#define vxh_lookup_vx_info(a,v) do { } while (0) --#define vxh_create_vx_info(a,v) do { } while (0) -- --#define vxh_dump_history() do { } while (0) -- -- --#endif /* CONFIG_VSERVER_HISTORY */ -- -- - #ifdef CONFIG_VSERVER_DEBUG - #define vxd_assert_lock(l) assert_spin_locked(l) - #define vxd_assert(c,f,x...) vxlprintk(!(c), \ -Index: kernel/cacct_int.h -=================================================================== ---- kernel/cacct_int.h (revision 0) -+++ kernel/cacct_int.h (revision 2369) -@@ -0,0 +1,21 @@ -+#ifndef _VX_CACCT_INT_H -+#define _VX_CACCT_INT_H -+ -+ -+#ifdef __KERNEL__ -+ -+static inline -+unsigned long vx_sock_count(struct _vx_cacct *cacct, int type, int pos) -+{ -+ return atomic_read(&cacct->sock[type][pos].count); -+} -+ -+ -+static inline -+unsigned long vx_sock_total(struct _vx_cacct *cacct, int type, int pos) -+{ -+ return atomic_read(&cacct->sock[type][pos].total); -+} -+ -+#endif /* __KERNEL__ */ -+#endif /* _VX_CACCT_INT_H */ -Index: kernel/network.h -=================================================================== ---- kernel/network.h (revision 2366) -+++ kernel/network.h (revision 2369) -@@ -13,14 +13,17 @@ - - /* network flags */ - -+#define NXF_INFO_LOCK 0x00000001 -+ - #define NXF_STATE_SETUP (1ULL<<32) -+#define NXF_STATE_ADMIN (1ULL<<34) - - #define NXF_SC_HELPER (1ULL<<36) - #define NXF_PERSISTENT (1ULL<<38) - --#define NXF_ONE_TIME (0x0001ULL<<32) -+#define NXF_ONE_TIME (0x0005ULL<<32) - --#define NXF_INIT_SET (0) -+#define NXF_INIT_SET (NXF_STATE_ADMIN) - - - /* address types */ -@@ -71,6 +74,26 @@ - #define NXS_SHUTDOWN 0x0100 - #define NXS_RELEASED 0x8000 - -+/* check conditions */ -+ -+#define NX_ADMIN 0x0001 -+#define NX_WATCH 0x0002 -+#define NX_BLEND 0x0004 -+#define NX_HOSTID 0x0008 -+ -+#define NX_IDENT 0x0010 -+#define NX_EQUIV 0x0020 -+#define NX_PARENT 0x0040 -+#define NX_CHILD 0x0080 -+ -+#define NX_ARG_MASK 0x00F0 -+ -+#define NX_DYNAMIC 0x0100 -+#define NX_STATIC 0x0200 -+ -+#define NX_ATR_MASK 0x0F00 -+ -+ - extern struct nx_info *lookup_nx_info(int); - - extern int get_nid_list(int, unsigned int *, int); -Index: kernel/cacct_def.h -=================================================================== ---- kernel/cacct_def.h (revision 0) -+++ kernel/cacct_def.h (revision 2369) -@@ -0,0 +1,43 @@ -+#ifndef _VX_CACCT_DEF_H -+#define _VX_CACCT_DEF_H -+ -+#include <asm/atomic.h> -+#include <linux/vserver/cacct.h> -+ -+ -+struct _vx_sock_acc { -+ atomic_t count; -+ atomic_t total; -+}; -+ -+/* context sub struct */ -+ -+struct _vx_cacct { -+ struct _vx_sock_acc sock[VXA_SOCK_SIZE][3]; -+ atomic_t slab[8]; -+ atomic_t page[6][8]; -+}; -+ -+#ifdef CONFIG_VSERVER_DEBUG -+ -+static inline void __dump_vx_cacct(struct _vx_cacct *cacct) -+{ -+ int i,j; -+ -+ printk("\t_vx_cacct:"); -+ for (i=0; i<6; i++) { -+ struct _vx_sock_acc *ptr = cacct->sock[i]; -+ -+ printk("\t [%d] =", i); -+ for (j=0; j<3; j++) { -+ printk(" [%d] = %8d, %8d", j, -+ atomic_read(&ptr[j].count), -+ atomic_read(&ptr[j].total)); -+ } -+ printk("\n"); -+ } -+} -+ -+#endif -+ -+#endif /* _VX_CACCT_DEF_H */ -Index: kernel/inode.h -=================================================================== ---- kernel/inode.h (revision 2366) -+++ kernel/inode.h (revision 2369) -@@ -2,7 +2,7 @@ - #define _VX_INODE_H - - --#define IATTR_XID 0x01000000 -+#define IATTR_TAG 0x01000000 - - #define IATTR_ADMIN 0x00000001 - #define IATTR_WATCH 0x00000002 -Index: kernel/cacct_cmd.h -=================================================================== ---- kernel/cacct_cmd.h (revision 0) -+++ kernel/cacct_cmd.h (revision 2369) -@@ -0,0 +1,23 @@ -+#ifndef _VX_CACCT_CMD_H -+#define _VX_CACCT_CMD_H -+ -+ -+/* virtual host info name commands */ -+ -+#define VCMD_sock_stat VC_CMD(VSTAT, 5, 0) -+ -+struct vcmd_sock_stat_v0 { -+ uint32_t field; -+ uint32_t count[3]; -+ uint64_t total[3]; -+}; -+ -+ -+#ifdef __KERNEL__ -+ -+#include <linux/compiler.h> -+ -+extern int vc_sock_stat(struct vx_info *, void __user *); -+ -+#endif /* __KERNEL__ */ -+#endif /* _VX_CACCT_CMD_H */ -Index: kernel/global.h -=================================================================== ---- kernel/global.h (revision 0) -+++ kernel/global.h (revision 2369) -@@ -0,0 +1,8 @@ -+#ifndef _VX_GLOBAL_H -+#define _VX_GLOBAL_H -+ -+ -+extern atomic_t vx_global_ctotal; -+extern atomic_t vx_global_cactive; -+ -+#endif /* _VX_GLOBAL_H */ -Index: kernel/sched_def.h -=================================================================== ---- kernel/sched_def.h (revision 2366) -+++ kernel/sched_def.h (revision 2369) -@@ -8,31 +8,60 @@ - #include <asm/param.h> - - --struct _vx_ticks { -- uint64_t user_ticks; /* token tick events */ -- uint64_t sys_ticks; /* token tick events */ -- uint64_t hold_ticks; /* token ticks paused */ -- uint64_t unused[5]; /* cacheline ? */ --}; -- - /* context sub struct */ - - struct _vx_sched { -- atomic_t tokens; /* number of CPU tokens */ - spinlock_t tokens_lock; /* lock for token bucket */ - -- int fill_rate; /* Fill rate: add X tokens... */ -- int interval; /* Divisor: per Y jiffies */ -+ int tokens; /* number of CPU tokens */ -+ int fill_rate[2]; /* Fill rate: add X tokens... */ -+ int interval[2]; /* Divisor: per Y jiffies */ - int tokens_min; /* Limit: minimum for unhold */ - int tokens_max; /* Limit: no more than N tokens */ -- uint32_t jiffies; /* last time accounted */ - -- int priority_bias; /* bias offset for priority */ -+ unsigned update_mask; /* which features should be updated */ -+ cpumask_t update; /* CPUs which should update */ -+ -+ int prio_bias; /* bias offset for priority */ - int vavavoom; /* last calculated vavavoom */ -+}; - -- cpumask_t cpus_allowed; /* cpu mask for context */ -+struct _vx_sched_pc { -+ int tokens; /* number of CPU tokens */ -+ int flags; /* bucket flags */ - -- struct _vx_ticks cpu[NR_CPUS]; -+ int fill_rate[2]; /* Fill rate: add X tokens... */ -+ int interval[2]; /* Divisor: per Y jiffies */ -+ int tokens_min; /* Limit: minimum for unhold */ -+ int tokens_max; /* Limit: no more than N tokens */ -+ -+ unsigned long norm_time; /* last time accounted */ -+ unsigned long idle_time; /* non linear time for fair sched */ -+ unsigned long token_time; /* token time for accounting */ -+ unsigned long onhold; /* jiffies when put on hold */ -+ -+ uint64_t user_ticks; /* token tick events */ -+ uint64_t sys_ticks; /* token tick events */ -+ uint64_t hold_ticks; /* token ticks paused */ - }; - -+ -+#define VXSF_ONHOLD 0x0001 -+#define VXSF_IDLE_TIME 0x0100 -+ -+#ifdef CONFIG_VSERVER_DEBUG -+ -+static inline void __dump_vx_sched(struct _vx_sched *sched) -+{ -+ printk("\t_vx_sched:\n"); -+ printk("\t tokens: %4d/%4d, %4d/%4d, %4d, %4d\n", -+ sched->fill_rate[0], sched->interval[0], -+ sched->fill_rate[1], sched->interval[1], -+ sched->tokens_min, sched->tokens_max); -+ printk("\t priority = %4d, %4d\n", -+ sched->prio_bias, sched->vavavoom); -+} -+ -+#endif -+ - #endif /* _VX_SCHED_DEF_H */ -Index: kernel/dlimit_cmd.h -=================================================================== ---- kernel/dlimit_cmd.h (revision 2366) -+++ kernel/dlimit_cmd.h (revision 2369) -@@ -25,11 +25,16 @@ - uint32_t flags; - }; - -+#define CDLIM_UNSET ((uint32_t)0UL) -+#define CDLIM_INFINITY ((uint32_t)~0UL) -+#define CDLIM_KEEP ((uint32_t)~1UL) - - #ifdef __KERNEL__ - - #ifdef CONFIG_COMPAT - -+#include <asm/compat.h> -+ - struct vcmd_ctx_dlimit_base_v0_x32 { - compat_uptr_t name_ptr; - uint32_t flags; -Index: kernel/sched_cmd.h -=================================================================== ---- kernel/sched_cmd.h (revision 2366) -+++ kernel/sched_cmd.h (revision 2369) -@@ -5,7 +5,8 @@ - /* sched vserver commands */ - - #define VCMD_set_sched_v2 VC_CMD(SCHED, 1, 2) --#define VCMD_set_sched VC_CMD(SCHED, 1, 3) -+#define VCMD_set_sched_v3 VC_CMD(SCHED, 1, 3) -+#define VCMD_set_sched VC_CMD(SCHED, 1, 4) - - struct vcmd_set_sched_v2 { - int32_t fill_rate; -@@ -26,23 +27,46 @@ - int32_t priority_bias; - }; - -+struct vcmd_set_sched_v4 { -+ uint32_t set_mask; -+ int32_t fill_rate; -+ int32_t interval; -+ int32_t tokens; -+ int32_t tokens_min; -+ int32_t tokens_max; -+ int32_t prio_bias; -+ int32_t cpu_id; -+ int32_t bucket_id; -+}; - -+ - #define VXSM_FILL_RATE 0x0001 - #define VXSM_INTERVAL 0x0002 -+#define VXSM_FILL_RATE2 0x0004 -+#define VXSM_INTERVAL2 0x0008 - #define VXSM_TOKENS 0x0010 - #define VXSM_TOKENS_MIN 0x0020 - #define VXSM_TOKENS_MAX 0x0040 - #define VXSM_PRIO_BIAS 0x0100 - --#define SCHED_KEEP (-2) -+#define VXSM_IDLE_TIME 0x0200 -+#define VXSM_FORCE 0x0400 - -+#define VXSM_V3_MASK 0x0173 -+#define VXSM_SET_MASK 0x01FF -+ -+#define VXSM_CPU_ID 0x1000 -+#define VXSM_BUCKET_ID 0x2000 -+ -+#define SCHED_KEEP (-2) /* only for v2 */ -+ - #ifdef __KERNEL__ - - #include <linux/compiler.h> - --extern int vc_set_sched_v1(uint32_t, void __user *); --extern int vc_set_sched_v2(uint32_t, void __user *); --extern int vc_set_sched(uint32_t, void __user *); -+extern int vc_set_sched_v2(struct vx_info *, void __user *); -+extern int vc_set_sched_v3(struct vx_info *, void __user *); -+extern int vc_set_sched(struct vx_info *, void __user *); - - #endif /* __KERNEL__ */ - #endif /* _VX_SCHED_CMD_H */ -Index: kernel/debug_cmd.h -=================================================================== ---- kernel/debug_cmd.h (revision 2366) -+++ kernel/debug_cmd.h (revision 2369) -@@ -6,9 +6,53 @@ - - #define VCMD_dump_history VC_CMD(DEBUG, 1, 0) - -+#define VCMD_read_history VC_CMD(DEBUG, 5, 0) -+#define VCMD_read_monitor VC_CMD(DEBUG, 6, 0) -+ -+struct vcmd_read_history_v0 { -+ uint32_t index; -+ uint32_t count; -+ char __user *data; -+}; -+ -+struct vcmd_read_monitor_v0 { -+ uint32_t index; -+ uint32_t count; -+ char __user *data; -+}; -+ -+ - #ifdef __KERNEL__ - -+#ifdef CONFIG_COMPAT -+ -+#include <asm/compat.h> -+ -+struct vcmd_read_history_v0_x32 { -+ uint32_t index; -+ uint32_t count; -+ compat_uptr_t data_ptr; -+}; -+ -+struct vcmd_read_monitor_v0_x32 { -+ uint32_t index; -+ uint32_t count; -+ compat_uptr_t data_ptr; -+}; -+ -+#endif /* CONFIG_COMPAT */ -+ - extern int vc_dump_history(uint32_t); - -+extern int vc_read_history(uint32_t, void __user *); -+extern int vc_read_monitor(uint32_t, void __user *); -+ -+#ifdef CONFIG_COMPAT -+ -+extern int vc_read_history_x32(uint32_t, void __user *); -+extern int vc_read_monitor_x32(uint32_t, void __user *); -+ -+#endif /* CONFIG_COMPAT */ -+ - #endif /* __KERNEL__ */ - #endif /* _VX_DEBUG_CMD_H */ -Index: kernel/tag.h -=================================================================== ---- kernel/tag.h (revision 0) -+++ kernel/tag.h (revision 2369) -@@ -0,0 +1,153 @@ -+#ifndef _DX_TAG_H -+#define _DX_TAG_H -+ -+ -+#define DX_TAG(in) (IS_TAGGED(in)) -+ -+ -+#ifdef CONFIG_DX_TAG_NFSD -+#define DX_TAG_NFSD 1 -+#else -+#define DX_TAG_NFSD 0 -+#endif -+ -+ -+#ifdef CONFIG_TAGGING_NONE -+ -+#define MAX_UID 0xFFFFFFFF -+#define MAX_GID 0xFFFFFFFF -+ -+#define INOTAG_TAG(cond, uid, gid, tag) (0) -+ -+#define TAGINO_UID(cond, uid, tag) (uid) -+#define TAGINO_GID(cond, gid, tag) (gid) -+ -+#endif -+ -+ -+#ifdef CONFIG_TAGGING_GID16 -+ -+#define MAX_UID 0xFFFFFFFF -+#define MAX_GID 0x0000FFFF -+ -+#define INOTAG_TAG(cond, uid, gid, tag) \ -+ ((cond) ? (((gid) >> 16) & 0xFFFF) : 0) -+ -+#define TAGINO_UID(cond, uid, tag) (uid) -+#define TAGINO_GID(cond, gid, tag) \ -+ ((cond) ? (((gid) & 0xFFFF) | ((tag) << 16)) : (gid)) -+ -+#endif -+ -+ -+#ifdef CONFIG_TAGGING_ID24 -+ -+#define MAX_UID 0x00FFFFFF -+#define MAX_GID 0x00FFFFFF -+ -+#define INOTAG_TAG(cond, uid, gid, tag) \ -+ ((cond) ? ((((uid) >> 16) & 0xFF00) | (((gid) >> 24) & 0xFF)) : 0) -+ -+#define TAGINO_UID(cond, uid, tag) \ -+ ((cond) ? (((uid) & 0xFFFFFF) | (((tag) & 0xFF00) << 16)) : (uid)) -+#define TAGINO_GID(cond, gid, tag) \ -+ ((cond) ? (((gid) & 0xFFFFFF) | (((tag) & 0x00FF) << 24)) : (gid)) -+ -+#endif -+ -+ -+#ifdef CONFIG_TAGGING_UID16 -+ -+#define MAX_UID 0x0000FFFF -+#define MAX_GID 0xFFFFFFFF -+ -+#define INOTAG_TAG(cond, uid, gid, tag) \ -+ ((cond) ? (((uid) >> 16) & 0xFFFF) : 0) -+ -+#define TAGINO_UID(cond, uid, tag) \ -+ ((cond) ? (((uid) & 0xFFFF) | ((tag) << 16)) : (uid)) -+#define TAGINO_GID(cond, gid, tag) (gid) -+ -+#endif -+ -+ -+#ifdef CONFIG_TAGGING_INTERN -+ -+#define MAX_UID 0xFFFFFFFF -+#define MAX_GID 0xFFFFFFFF -+ -+#define INOTAG_TAG(cond, uid, gid, tag) \ -+ ((cond) ? (tag) : 0) -+ -+#define TAGINO_UID(cond, uid, tag) (uid) -+#define TAGINO_GID(cond, gid, tag) (gid) -+ -+#endif -+ -+ -+#ifdef CONFIG_TAGGING_RUNTIME -+ -+#define MAX_UID 0xFFFFFFFF -+#define MAX_GID 0xFFFFFFFF -+ -+#define INOTAG_TAG(cond, uid, gid, tag) (0) -+ -+#define TAGINO_UID(cond, uid, tag) (uid) -+#define TAGINO_GID(cond, gid, tag) (gid) -+ -+#endif -+ -+ -+#ifndef CONFIG_TAGGING_NONE -+#define dx_current_fstag(sb) \ -+ ((sb)->s_flags & MS_TAGGED ? dx_current_tag(): 0) -+#else -+#define dx_current_fstag(sb) (0) -+#endif -+ -+#ifndef CONFIG_TAGGING_INTERN -+#define TAGINO_TAG(cond, tag) (0) -+#else -+#define TAGINO_TAG(cond, tag) ((cond) ? (tag) : 0) -+#endif -+ -+#define INOTAG_UID(cond, uid, gid) \ -+ ((cond) ? ((uid) & MAX_UID) : (uid)) -+#define INOTAG_GID(cond, uid, gid) \ -+ ((cond) ? ((gid) & MAX_GID) : (gid)) -+ -+ -+static inline uid_t dx_map_uid(uid_t uid) -+{ -+ if ((uid > MAX_UID) && (uid != -1)) -+ uid = -2; -+ return (uid & MAX_UID); -+} -+ -+static inline gid_t dx_map_gid(gid_t gid) -+{ -+ if ((gid > MAX_GID) && (gid != -1)) -+ gid = -2; -+ return (gid & MAX_GID); -+} -+ -+ -+#ifdef CONFIG_VSERVER_LEGACY -+#define FIOC_GETTAG _IOR('x', 1, long) -+#define FIOC_SETTAG _IOW('x', 2, long) -+#define FIOC_SETTAGJ _IOW('x', 3, long) -+#endif -+ -+#ifdef CONFIG_PROPAGATE -+ -+int dx_parse_tag(char *string, tag_t *tag, int remove); -+ -+void __dx_propagate_tag(struct nameidata *nd, struct inode *inode); -+ -+#define dx_propagate_tag(n,i) __dx_propagate_tag(n,i) -+ -+#else -+#define dx_propagate_tag(n,i) do { } while (0) -+#endif -+ -+#endif /* _DX_TAG_H */ -Index: kernel/network_cmd.h -=================================================================== ---- kernel/network_cmd.h (revision 2366) -+++ kernel/network_cmd.h (revision 2369) -@@ -19,7 +19,7 @@ - }; - - #ifdef __KERNEL__ --extern int vc_nx_info(uint32_t, void __user *); -+extern int vc_nx_info(struct nx_info *, void __user *); - - #endif /* __KERNEL__ */ - -@@ -46,10 +46,10 @@ - - #ifdef __KERNEL__ - extern int vc_net_create(uint32_t, void __user *); --extern int vc_net_migrate(uint32_t, void __user *); -+extern int vc_net_migrate(struct nx_info *, void __user *); - --extern int vc_net_add(uint32_t, void __user *); --extern int vc_net_remove(uint32_t, void __user *); -+extern int vc_net_add(struct nx_info *, void __user *); -+extern int vc_net_remove(struct nx_info *, void __user *); - - #endif /* __KERNEL__ */ - -@@ -65,8 +65,8 @@ - }; - - #ifdef __KERNEL__ --extern int vc_get_nflags(uint32_t, void __user *); --extern int vc_set_nflags(uint32_t, void __user *); -+extern int vc_get_nflags(struct nx_info *, void __user *); -+extern int vc_set_nflags(struct nx_info *, void __user *); - - #endif /* __KERNEL__ */ - -@@ -82,8 +82,8 @@ - }; - - #ifdef __KERNEL__ --extern int vc_get_ncaps(uint32_t, void __user *); --extern int vc_set_ncaps(uint32_t, void __user *); -+extern int vc_get_ncaps(struct nx_info *, void __user *); -+extern int vc_set_ncaps(struct nx_info *, void __user *); - - #endif /* __KERNEL__ */ - #endif /* _VX_CONTEXT_CMD_H */ -Index: kernel/limit.h -=================================================================== ---- kernel/limit.h (revision 2366) -+++ kernel/limit.h (revision 2369) -@@ -6,9 +6,55 @@ - #define VLIMIT_OPENFD 17 - #define VLIMIT_ANON 18 - #define VLIMIT_SHMEM 19 -+#define VLIMIT_SEMARY 20 -+#define VLIMIT_NSEMS 21 -+#define VLIMIT_DENTRY 22 - - #ifdef __KERNEL__ - -+#define VLIM_NOCHECK (1L << VLIMIT_DENTRY) -+ -+/* keep in sync with CRLIM_INFINITY */ -+ -+#define VLIM_INFINITY (~0ULL) -+ -+#ifndef RLIM_INFINITY -+#warning RLIM_INFINITY is undefined -+#endif -+ -+#define __rlim_val(l,r,v) ((l)->res[(r)].v) -+ -+#define __rlim_soft(l,r) __rlim_val(l,r,soft) -+#define __rlim_hard(l,r) __rlim_val(l,r,hard) -+ -+#define __rlim_rcur(l,r) __rlim_val(l,r,rcur) -+#define __rlim_rmin(l,r) __rlim_val(l,r,rmin) -+#define __rlim_rmax(l,r) __rlim_val(l,r,rmax) -+ -+#define __rlim_lhit(l,r) __rlim_val(l,r,lhit) -+#define __rlim_hit(l,r) atomic_inc(&__rlim_lhit(l,r)) -+ -+typedef atomic_long_t rlim_atomic_t; -+typedef unsigned long rlim_t; -+ -+#define __rlim_get(l,r) atomic_long_read(&__rlim_rcur(l,r)) -+#define __rlim_set(l,r,v) atomic_long_set(&__rlim_rcur(l,r), v) -+#define __rlim_inc(l,r) atomic_long_inc(&__rlim_rcur(l,r)) -+#define __rlim_dec(l,r) atomic_long_dec(&__rlim_rcur(l,r)) -+#define __rlim_add(l,r,v) atomic_long_add(v, &__rlim_rcur(l,r)) -+#define __rlim_sub(l,r,v) atomic_long_sub(v, &__rlim_rcur(l,r)) -+ -+ -+#if (RLIM_INFINITY == VLIM_INFINITY) -+#define VX_VLIM(r) ((long long)(long)(r)) -+#define VX_RLIM(v) ((rlim_t)(v)) -+#else -+#define VX_VLIM(r) (((r) == RLIM_INFINITY) \ -+ ? VLIM_INFINITY : (long long)(r)) -+#define VX_RLIM(v) (((v) == VLIM_INFINITY) \ -+ ? RLIM_INFINITY : (rlim_t)(v)) -+#endif -+ - struct sysinfo; - - void vx_vsi_meminfo(struct sysinfo *); -Index: kernel/namespace_cmd.h -=================================================================== ---- kernel/namespace_cmd.h (revision 2366) -+++ kernel/namespace_cmd.h (revision 2369) -@@ -3,7 +3,7 @@ - - - #define VCMD_enter_namespace VC_CMD(PROCALT, 1, 0) --/* XXX: This is not available in recent kernels */ -+/* XXX: This is not available in recent kernels */ - #define VCMD_cleanup_namespace VC_CMD(PROCALT, 2, 0) - #define VCMD_set_namespace_v0 VC_CMD(PROCALT, 3, 0) - #define VCMD_set_namespace VC_CMD(PROCALT, 3, 1) -@@ -11,8 +11,8 @@ - - #ifdef __KERNEL__ - --extern int vc_enter_namespace(uint32_t, void __user *); --extern int vc_set_namespace(uint32_t, void __user *); -+extern int vc_enter_namespace(struct vx_info *, void __user *); -+extern int vc_set_namespace(struct vx_info *, void __user *); - - #endif /* __KERNEL__ */ - #endif /* _VX_NAMESPACE_CMD_H */ -Index: kernel/inode_cmd.h -=================================================================== ---- kernel/inode_cmd.h (revision 2366) -+++ kernel/inode_cmd.h (revision 2369) -@@ -31,6 +31,8 @@ - - #ifdef CONFIG_COMPAT - -+#include <asm/compat.h> -+ - struct vcmd_ctx_iattr_v1_x32 { - compat_uptr_t name_ptr; - uint32_t xid; -Index: kernel/context.h -=================================================================== ---- kernel/context.h (revision 2366) -+++ kernel/context.h (revision 2369) -@@ -2,10 +2,16 @@ - #define _VX_CONTEXT_H - - #include <linux/types.h> -+//#include <linux/capability.h> - - - #define MAX_S_CONTEXT 65535 /* Arbitrary limit */ -+ -+#ifdef CONFIG_VSERVER_DYNAMIC_IDS - #define MIN_D_CONTEXT 49152 /* dynamic contexts start here */ -+#else -+#define MIN_D_CONTEXT 65536 -+#endif - - #define VX_DYNAMIC_ID ((uint32_t)-1) /* id for dynamic context */ - -@@ -29,12 +35,15 @@ - #define VXF_VIRT_UPTIME 0x00020000 - #define VXF_VIRT_CPU 0x00040000 - #define VXF_VIRT_LOAD 0x00080000 -+#define VXF_VIRT_TIME 0x00100000 - - #define VXF_HIDE_MOUNT 0x01000000 - #define VXF_HIDE_NETIF 0x02000000 -+#define VXF_HIDE_VINFO 0x04000000 - - #define VXF_STATE_SETUP (1ULL<<32) - #define VXF_STATE_INIT (1ULL<<33) -+#define VXF_STATE_ADMIN (1ULL<<34) - - #define VXF_SC_HELPER (1ULL<<36) - #define VXF_REBOOT_KILL (1ULL<<37) -@@ -45,9 +54,9 @@ - - #define VXF_IGNEG_NICE (1ULL<<52) - --#define VXF_ONE_TIME (0x0003ULL<<32) -+#define VXF_ONE_TIME (0x0007ULL<<32) - --#define VXF_INIT_SET (VXF_STATE_SETUP|VXF_STATE_INIT) -+#define VXF_INIT_SET (VXF_STATE_SETUP|VXF_STATE_INIT|VXF_STATE_ADMIN) - - - /* context migration */ -@@ -70,6 +79,8 @@ - #define VXC_BINARY_MOUNT 0x00040000 - - #define VXC_QUOTA_CTL 0x00100000 -+#define VXC_ADMIN_MAPPER 0x00200000 -+#define VXC_ADMIN_CLOOP 0x00400000 - - - /* context state changes */ -@@ -92,7 +103,13 @@ - #include "limit_def.h" - #include "sched_def.h" - #include "cvirt_def.h" -+#include "cacct_def.h" - -+struct _vx_info_pc { -+ struct _vx_sched_pc sched_pc; -+ struct _vx_cvirt_pc cvirt_pc; -+}; -+ - struct vx_info { - struct hlist_node vx_hlist; /* linked list of contexts */ - xid_t vx_id; /* context id */ -@@ -106,6 +123,7 @@ - uint64_t vx_flags; /* context flags */ - uint64_t vx_bcaps; /* bounding caps (system) */ - uint64_t vx_ccaps; /* context caps (vserver) */ -+ kernel_cap_t vx_cap_bset; /* the guest's bset */ - - struct task_struct *vx_reaper; /* guest reaper process */ - pid_t vx_initpid; /* PID of guest init */ -@@ -115,6 +133,12 @@ - struct _vx_cvirt cvirt; /* virtual/bias stuff */ - struct _vx_cacct cacct; /* context accounting */ - -+#ifndef CONFIG_SMP -+ struct _vx_info_pc info_pc; /* per cpu data */ -+#else -+ struct _vx_info_pc *ptr_pc; /* per cpu array */ -+#endif -+ - wait_queue_head_t vx_wait; /* context exit waitqueue */ - int reboot_cmd; /* last sys_reboot() cmd */ - int exit_code; /* last process exit code */ -@@ -122,12 +146,27 @@ - char vx_name[65]; /* vserver name */ - }; - -+#ifndef CONFIG_SMP -+#define vx_ptr_pc(vxi) (&(vxi)->info_pc) -+#define vx_per_cpu(vxi, v, id) vx_ptr_pc(vxi)->v -+#else -+#define vx_ptr_pc(vxi) ((vxi)->ptr_pc) -+#define vx_per_cpu(vxi, v, id) per_cpu_ptr(vx_ptr_pc(vxi), id)->v -+#endif - -+#define vx_cpu(vxi, v) vx_per_cpu(vxi, v, smp_processor_id()) -+ -+ -+struct vx_info_save { -+ struct vx_info *vxi; -+ xid_t xid; -+}; -+ -+ - /* status flags */ - - #define VXS_HASHED 0x0001 - #define VXS_PAUSED 0x0010 --#define VXS_ONHOLD 0x0020 - #define VXS_SHUTDOWN 0x0100 - #define VXS_HELPER 0x1000 - #define VXS_RELEASED 0x8000 -@@ -152,6 +191,14 @@ - #define VX_ATR_MASK 0x0F00 - - -+#ifdef CONFIG_VSERVER_PRIVACY -+#define VX_ADMIN_P (0) -+#define VX_WATCH_P (0) -+#else -+#define VX_ADMIN_P VX_ADMIN -+#define VX_WATCH_P VX_WATCH -+#endif -+ - extern void claim_vx_info(struct vx_info *, struct task_struct *); - extern void release_vx_info(struct vx_info *, struct task_struct *); - -Index: kernel/monitor.h -=================================================================== ---- kernel/monitor.h (revision 0) -+++ kernel/monitor.h (revision 2369) -@@ -0,0 +1,95 @@ -+#ifndef _VX_MONITOR_H -+#define _VX_MONITOR_H -+ -+ -+enum { -+ VXM_UNUSED = 0, -+ -+ VXM_SYNC = 0x10, -+ -+ VXM_UPDATE = 0x20, -+ VXM_UPDATE_1, -+ VXM_UPDATE_2, -+ -+ VXM_RQINFO_1 = 0x24, -+ VXM_RQINFO_2, -+ -+ VXM_ACTIVATE = 0x40, -+ VXM_DEACTIVATE, -+ VXM_IDLE, -+ -+ VXM_HOLD = 0x44, -+ VXM_UNHOLD, -+ -+ VXM_MIGRATE = 0x48, -+ VXM_RESCHED, -+ -+ /* all other bits are flags */ -+ VXM_SCHED = 0x80, -+}; -+ -+struct _vxm_update_1 { -+ uint32_t tokens_max; -+ uint32_t fill_rate; -+ uint32_t interval; -+}; -+ -+struct _vxm_update_2 { -+ uint32_t tokens_min; -+ uint32_t fill_rate; -+ uint32_t interval; -+}; -+ -+struct _vxm_rqinfo_1 { -+ uint16_t running; -+ uint16_t onhold; -+ uint16_t iowait; -+ uint16_t uintr; -+ uint32_t idle_tokens; -+}; -+ -+struct _vxm_rqinfo_2 { -+ uint32_t norm_time; -+ uint32_t idle_time; -+ uint32_t idle_skip; -+}; -+ -+struct _vxm_sched { -+ uint32_t tokens; -+ uint32_t norm_time; -+ uint32_t idle_time; -+}; -+ -+struct _vxm_task { -+ uint16_t pid; -+ uint16_t state; -+}; -+ -+struct _vxm_event { -+ uint32_t jif; -+ union { -+ uint32_t seq; -+ uint32_t sec; -+ }; -+ union { -+ uint32_t tokens; -+ uint32_t nsec; -+ struct _vxm_task tsk; -+ }; -+}; -+ -+struct _vx_mon_entry { -+ uint16_t type; -+ uint16_t xid; -+ union { -+ struct _vxm_event ev; -+ struct _vxm_sched sd; -+ struct _vxm_update_1 u1; -+ struct _vxm_update_2 u2; -+ struct _vxm_rqinfo_1 q1; -+ struct _vxm_rqinfo_2 q2; -+ }; -+}; -+ -+ -+#endif /* _VX_MONITOR_H */ -Index: kernel/cvirt.h -=================================================================== ---- kernel/cvirt.h (revision 2366) -+++ kernel/cvirt.h (revision 2369) -@@ -21,6 +21,4 @@ - int vx_do_syslog(int, char __user *, int); - - #endif /* __KERNEL__ */ --#else /* _VX_CVIRT_H */ --#warning duplicate inclusion - #endif /* _VX_CVIRT_H */ -Index: kernel/limit_int.h -=================================================================== ---- kernel/limit_int.h (revision 2366) -+++ kernel/limit_int.h (revision 2369) -@@ -4,73 +4,80 @@ - - #ifdef __KERNEL__ - --#define VXD_RCRES(r) VXD_CBIT(cres, (r)) --#define VXD_RLIMIT(r) VXD_CBIT(limit, (r)) -+#define VXD_RCRES_COND(r) VXD_CBIT(cres, (r)) -+#define VXD_RLIMIT_COND(r) VXD_CBIT(limit, (r)) - - extern const char *vlimit_name[NUM_LIMITS]; - - static inline void __vx_acc_cres(struct vx_info *vxi, - int res, int dir, void *_data, char *_file, int _line) - { -- if (VXD_RCRES(res)) -- vxlprintk(1, "vx_acc_cres[%5d,%s,%2d]: %5d%s (%p)", -+ if (VXD_RCRES_COND(res)) -+ vxlprintk(1, "vx_acc_cres[%5d,%s,%2d]: %5ld%s (%p)", - (vxi ? vxi->vx_id : -1), vlimit_name[res], res, -- (vxi ? atomic_read(&vxi->limit.rcur[res]) : 0), -+ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0), - (dir > 0) ? "++" : "--", _data, _file, _line); - if (!vxi) - return; - - if (dir > 0) -- atomic_inc(&vxi->limit.rcur[res]); -+ __rlim_inc(&vxi->limit, res); - else -- atomic_dec(&vxi->limit.rcur[res]); -+ __rlim_dec(&vxi->limit, res); - } - - static inline void __vx_add_cres(struct vx_info *vxi, - int res, int amount, void *_data, char *_file, int _line) - { -- if (VXD_RCRES(res)) -- vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5d += %5d (%p)", -+ if (VXD_RCRES_COND(res)) -+ vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5ld += %5d (%p)", - (vxi ? vxi->vx_id : -1), vlimit_name[res], res, -- (vxi ? atomic_read(&vxi->limit.rcur[res]) : 0), -+ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0), - amount, _data, _file, _line); - if (amount == 0) - return; - if (!vxi) - return; -- atomic_add(amount, &vxi->limit.rcur[res]); -+ __rlim_add(&vxi->limit, res, amount); - } - - static inline int __vx_cres_avail(struct vx_info *vxi, - int res, int num, char *_file, int _line) - { -- unsigned long value; -+ rlim_t value; - -- if (VXD_RLIMIT(res)) -- vxlprintk(1, "vx_cres_avail[%5d,%s,%2d]: %5ld > %5d + %5d", -+ if (VXD_RLIMIT_COND(res)) -+ vxlprintk(1, "vx_cres_avail[%5d,%s,%2d]: %5ld/%5ld > %5ld + %5d", - (vxi ? vxi->vx_id : -1), vlimit_name[res], res, -- (vxi ? vxi->limit.rlim[res] : 1), -- (vxi ? atomic_read(&vxi->limit.rcur[res]) : 0), -+ (vxi ? (long)__rlim_soft(&vxi->limit, res) : -1), -+ (vxi ? (long)__rlim_hard(&vxi->limit, res) : -1), -+ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0), - num, _file, _line); - if (num == 0) - return 1; - if (!vxi) - return 1; - -- value = atomic_read(&vxi->limit.rcur[res]); -+ value = __rlim_get(&vxi->limit, res); - -- if (value > vxi->limit.rmax[res]) -- vxi->limit.rmax[res] = value; -+ if (value > __rlim_rmax(&vxi->limit, res)) -+ __rlim_rmax(&vxi->limit, res) = value; -+ else if (value < __rlim_rmin(&vxi->limit, res)) -+ __rlim_rmin(&vxi->limit, res) = value; - -- if (vxi->limit.rlim[res] == RLIM_INFINITY) -- return 1; -+ if (__rlim_soft(&vxi->limit, res) == RLIM_INFINITY) -+ return -1; -+ if (value + num <= __rlim_soft(&vxi->limit, res)) -+ return -1; - -- if (value + num <= vxi->limit.rlim[res]) -+ if (__rlim_hard(&vxi->limit, res) == RLIM_INFINITY) - return 1; -+ if (value + num <= __rlim_hard(&vxi->limit, res)) -+ return 1; - -- atomic_inc(&vxi->limit.lhit[res]); -+ __rlim_hit(&vxi->limit, res); - return 0; - } - - #endif /* __KERNEL__ */ --#endif /* _VX_LIMIT_H */ -+#endif /* _VX_LIMIT_INT_H */ -Index: configure.ac -=================================================================== ---- configure.ac (revision 2366) -+++ configure.ac (revision 2369) -@@ -218,18 +218,19 @@ - AH_TEMPLATE(VC_ENABLE_API_V13OBS, [Enable support for some obsoleted API of vserver 1.3.x]) - AH_TEMPLATE(VC_ENABLE_API_V13, [Enable support for API of vserver 1.3.x]) - AH_TEMPLATE(VC_ENABLE_API_NET, [Enable support for network context API]) -+AH_TEMPLATE(VC_ENABLE_API_V21, [Enable support for API of vserver 2.1.x]) - AH_TEMPLATE(VC_ENABLE_API_OLDPROC, [Enable API for a backward compatible /proc parsing]) - AH_TEMPLATE(VC_ENABLE_API_OLDUTS, [Enable API for a backward compatible uts handling]) - - AC_MSG_CHECKING([for supported APIs]) - AC_ARG_ENABLE([apis], - [AC_HELP_STRING([--enable-apis=APIS], -- [enable support for the given apis; possible values are: legacy,compat,v11,fscompat,v13obs,v13,net, ALL,NOLEGACY (default: v13,net)])], -+ [enable support for the given apis; possible values are: legacy,compat,v11,fscompat,v13obs,v13,net, ALL,NOLEGACY (default: v13,net,v21)])], - [], -- [enable_apis=v13,net]) -+ [enable_apis=v13,net,v21]) - --test x"$enable_apis" != xALL || enable_apis='legacy,compat,v11,fscompat,v13obs,v13,net' --test x"$enable_apis" != xNOLEGACY || enable_apis='compat,v11,fscompat,v13,net' -+test x"$enable_apis" != xALL || enable_apis='legacy,compat,v11,fscompat,v13obs,v13,net,v21' -+test x"$enable_apis" != xNOLEGACY || enable_apis='compat,v11,fscompat,v13,net,v21' - enable_api_oldproc= - enable_api_olduts= - old_IFS=$IFS -@@ -254,6 +255,7 @@ - AC_DEFINE(VC_ENABLE_API_V13, 1);; - (v13) AC_DEFINE(VC_ENABLE_API_V13, 1);; - (net) AC_DEFINE(VC_ENABLE_API_NET, 1);; -+ (v21) AC_DEFINE(VC_ENABLE_API_V21, 1);; - (oldproc) enable_api_oldproc=2;; - (olduts) enable_api_olduts=2;; - (*) AC_MSG_ERROR(['$i' is not a supported API]);; -Index: lib/ccaps-v13.c -=================================================================== ---- lib/ccaps-v13.c (revision 2366) -+++ lib/ccaps-v13.c (revision 2369) -@@ -38,6 +38,8 @@ - DECL("secure_remount", VC_VXC_SECURE_REMOUNT), - DECL("binary_mount", VC_VXC_BINARY_MOUNT), - DECL("quota_ctl", VC_VXC_QUOTA_CTL), -+ DECL("admin_mapper", VC_VXC_ADMIN_MAPPER), -+ DECL("admin_cloop", VC_VXC_ADMIN_CLOOP), - // some deprecated values... - DECL("mount", VC_VXC_SECURE_MOUNT), - DECL("remount", VC_VXC_SECURE_REMOUNT), -Index: lib/syscall_setsched-v21.hc -=================================================================== ---- lib/syscall_setsched-v21.hc (revision 0) -+++ lib/syscall_setsched-v21.hc (revision 2369) -@@ -0,0 +1,41 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Daniel Hokka Zakrisson <daniel@hozac.com> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+#include "vserver.h" -+ -+static inline ALWAYSINLINE int -+vc_set_sched_v21(xid_t xid, struct vc_set_sched const *data) -+{ -+ struct vcmd_set_sched_v4 k_data; -+ -+ k_data.set_mask = data->set_mask; -+ k_data.fill_rate = data->fill_rate; -+ k_data.interval = data->interval; -+ k_data.tokens = data->tokens; -+ k_data.tokens_min = data->tokens_min; -+ k_data.tokens_max = data->tokens_max; -+ k_data.prio_bias = data->priority_bias; -+ k_data.cpu_id = data->cpu_id; -+ k_data.bucket_id = data->bucket_id; -+ -+ return vserver(VCMD_set_sched, CTX_USER2KERNEL(xid), &k_data); -+} -Index: lib/syscall_setccaps.c -=================================================================== ---- lib/syscall_setccaps.c (revision 2366) -+++ lib/syscall_setccaps.c (revision 2369) -@@ -21,14 +21,22 @@ - #endif - - #include "vserver.h" --#include "vserver-internal.h" - #include "virtual.h" - -+#if defined(VC_ENABLE_API_V13) && defined(VC_ENABLE_API_V21) -+# define VC_MULTIVERSION_SYSCALL 1 -+#endif -+#include "vserver-internal.h" -+ - #if defined(VC_ENABLE_API_V13) - # include "syscall_setccaps-v13.hc" - #endif - --#if defined(VC_ENABLE_API_V13) -+#if defined(VC_ENABLE_API_V21) -+# include "syscall_setccaps-v21.hc" -+#endif -+ -+#if defined(VC_ENABLE_API_V13) || defined(VC_ENABLE_API_V21) - int - vc_set_ccaps(xid_t xid, struct vc_ctx_caps const *caps) - { -@@ -37,6 +45,7 @@ - return -1; - } - -- CALL_VC(CALL_VC_V13A(vc_set_ccaps, xid, caps)); -+ CALL_VC(CALL_VC_V21(vc_set_ccaps, xid, caps), -+ CALL_VC_V13A(vc_set_ccaps, xid, caps)); - } - #endif -Index: lib/vserver.h -=================================================================== ---- lib/vserver.h (revision 2366) -+++ lib/vserver.h (revision 2369) -@@ -174,12 +174,15 @@ - #define VC_VXF_VIRT_UPTIME 0x00020000ull - #define VC_VXF_VIRT_CPU 0x00040000ull - #define VC_VXF_VIRT_LOAD 0x00080000ull -+#define VC_VXF_VIRT_TIME 0x00100000ull - - #define VC_VXF_HIDE_MOUNT 0x01000000ull - #define VC_VXF_HIDE_NETIF 0x02000000ull -+#define VC_VXF_HIDE_VINFO 0x04000000ull - - #define VC_VXF_STATE_SETUP (1ULL<<32) - #define VC_VXF_STATE_INIT (1ULL<<33) -+#define VC_VXF_STATE_ADMIN (1ULL<<34) - - #define VC_VXF_SC_HELPER (1ULL<<36) - #define VC_VXF_REBOOT_KILL (1ULL<<37) -@@ -203,16 +206,39 @@ - #define VC_VXC_BINARY_MOUNT 0x00040000ull - - #define VC_VXC_QUOTA_CTL 0x00100000ull -+#define VC_VXC_ADMIN_MAPPER 0x00200000ull -+#define VC_VXC_ADMIN_CLOOP 0x00400000ull - - --#define VC_VXSM_FILL_RATE 0x0001 --#define VC_VXSM_INTERVAL 0x0002 --#define VC_VXSM_TOKENS 0x0010 --#define VC_VXSM_TOKENS_MIN 0x0020 --#define VC_VXSM_TOKENS_MAX 0x0040 --#define VC_VXSM_PRIO_BIAS 0x0100 -+// the scheduler flags -+#define VC_VXSM_FILL_RATE 0x0001 -+#define VC_VXSM_INTERVAL 0x0002 -+#define VC_VXSM_FILL_RATE2 0x0004 -+#define VC_VXSM_INTERVAL2 0x0008 -+#define VC_VXSM_TOKENS 0x0010 -+#define VC_VXSM_TOKENS_MIN 0x0020 -+#define VC_VXSM_TOKENS_MAX 0x0040 -+#define VC_VXSM_PRIO_BIAS 0x0100 -+#define VC_VXSM_CPU_ID 0x1000 -+#define VC_VXSM_BUCKET_ID 0x2000 - -+#define VC_VXSM_IDLE_TIME 0x0200 -+#define VC_VXSM_FORCE 0x0400 - -+#define VC_VXSM_V3_MASK 0x0173 -+ -+ -+// the network flags -+#define VC_NXF_INFO_LOCK 0x00000001ull -+ -+#define VC_NXF_STATE_SETUP (1ULL<<32) -+#define VC_NXF_STATE_ADMIN (1ULL<<34) -+ -+#define VC_NXF_SC_HELPER (1ULL<<36) -+#define VC_NXF_PERSISTENT (1ULL<<38) -+ -+ -+ - #define VC_BAD_PERSONALITY ((uint_least32_t)(-1)) - - -@@ -684,6 +710,8 @@ - int_least32_t tokens_min; - int_least32_t tokens_max; - int_least32_t priority_bias; -+ int_least32_t cpu_id; -+ int_least32_t bucket_id; - }; - - int vc_set_sched(xid_t xid, struct vc_set_sched const *); -Index: lib/syscall_setsched-v13.hc -=================================================================== ---- lib/syscall_setsched-v13.hc (revision 2366) -+++ lib/syscall_setsched-v13.hc (revision 2369) -@@ -30,21 +30,13 @@ - { - struct vcmd_set_sched_v3 k_data; - -- // This expression will be evaluated at compile-time -- if (sizeof(struct vcmd_set_sched_v3)==sizeof(struct vc_set_sched) && -- X(set_mask) && X(fill_rate) && X(interval) && X(tokens) && -- X(tokens_min) && X(tokens_max) && X(priority_bias)) -- return vserver(VCMD_set_sched, CTX_USER2KERNEL(xid), -- const_cast(struct vc_set_sched *)(data)); -- else { -- k_data.set_mask = data->set_mask; -- k_data.fill_rate = data->fill_rate; -- k_data.interval = data->interval; -- k_data.tokens = data->tokens; -- k_data.tokens_min = data->tokens_min; -- k_data.tokens_max = data->tokens_max; -- k_data.priority_bias = data->priority_bias; -+ k_data.set_mask = data->set_mask & VC_VXSM_V3_MASK; -+ k_data.fill_rate = data->fill_rate; -+ k_data.interval = data->interval; -+ k_data.tokens = data->tokens; -+ k_data.tokens_min = data->tokens_min; -+ k_data.tokens_max = data->tokens_max; -+ k_data.priority_bias = data->priority_bias; - -- return vserver(VCMD_set_sched, CTX_USER2KERNEL(xid), &k_data); -- } -+ return vserver(VCMD_set_sched_v3, CTX_USER2KERNEL(xid), &k_data); - } -Index: lib/syscall_setccaps-v21.hc -=================================================================== ---- lib/syscall_setccaps-v21.hc (revision 0) -+++ lib/syscall_setccaps-v21.hc (revision 2369) -@@ -0,0 +1,39 @@ -+// $Id$ --*- c -*-- -+ -+// Copyright (C) 2006 Daniel Hokka Zakrisson <daniel@hozac.com> -+// -+// 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; version 2 of the License. -+// -+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+ -+#ifdef HAVE_CONFIG_H -+# include <config.h> -+#endif -+ -+static inline ALWAYSINLINE int -+vc_set_ccaps_v21(xid_t xid, struct vc_ctx_caps const *caps) -+{ -+ struct vcmd_ctx_caps_v1 k_ccaps; -+ struct vcmd_bcaps k_bcaps; -+ int ret; -+ -+ k_bcaps.bcaps = caps->bcaps; -+ k_bcaps.bmask = caps->bmask; -+ k_ccaps.ccaps = caps->ccaps; -+ k_ccaps.cmask = caps->cmask; -+ -+ ret = vserver(VCMD_set_ccaps, CTX_USER2KERNEL(xid), &k_ccaps); -+ if (ret) -+ return ret; -+ return vserver(VCMD_set_bcaps, CTX_USER2KERNEL(xid), &k_bcaps); -+} -Index: lib/Makefile-files -=================================================================== ---- lib/Makefile-files (revision 2366) -+++ lib/Makefile-files (revision 2369) -@@ -109,6 +109,8 @@ - lib/ncaps_list-net.c \ - lib/nflags-net.c \ - lib/nflags_list-net.c -+lib_v21_SRCS = lib/syscall_setccaps-v21.hc \ -+ lib/syscall_setsched-v21.hc - - if ENSC_HAVE_C99_COMPILER - lib_v13_SRCS += lib/syscall_adddlimit-v13.hc \ -@@ -153,6 +155,7 @@ - $(lib_management_SRCS) \ - $(lib_v11_SRCS) \ - $(lib_v13_SRCS) \ -+ $(lib_v21_SRCS) \ - $(ensc_fmt_SRCS) - - include_HEADERS += lib/vserver.h -Index: lib/cflags-v13.c -=================================================================== ---- lib/cflags-v13.c (revision 2366) -+++ lib/cflags-v13.c (revision 2369) -@@ -47,12 +47,15 @@ - DECL("virt_uptime", VC_VXF_VIRT_UPTIME), - DECL("virt_cpu", VC_VXF_VIRT_CPU), - DECL("virt_load", VC_VXF_VIRT_LOAD), -+ DECL("virt_time", VC_VXF_VIRT_TIME), - - DECL("hide_mount", VC_VXF_HIDE_MOUNT), - DECL("hide_netif", VC_VXF_HIDE_NETIF), -+ DECL("hide_vinfo", VC_VXF_HIDE_VINFO), - - DECL("state_setup", VC_VXF_STATE_SETUP), - DECL("state_init", VC_VXF_STATE_INIT), -+ DECL("state_admin", VC_VXF_STATE_ADMIN), - - DECL("sc_helper", VC_VXF_SC_HELPER), - DECL("persistent", VC_VXF_PERSISTENT), -Index: lib/syscall_setccaps-v13.hc -=================================================================== ---- lib/syscall_setccaps-v13.hc (revision 2366) -+++ lib/syscall_setccaps-v13.hc (revision 2369) -@@ -29,5 +29,5 @@ - k_caps.ccaps = caps->ccaps; - k_caps.cmask = caps->cmask; - -- return vserver(VCMD_set_ccaps, CTX_USER2KERNEL(xid), &k_caps); -+ return vserver(VCMD_set_ccaps_v0, CTX_USER2KERNEL(xid), &k_caps); - } -Index: lib/vserver-internal.h -=================================================================== ---- lib/vserver-internal.h (revision 2366) -+++ lib/vserver-internal.h (revision 2369) -@@ -104,6 +104,13 @@ - #endif - - -+#ifdef VC_ENABLE_API_V21 -+# define CALL_VC_V21(F,...) CALL_VC_GENERAL(0x00020100, v21, F, __VA_ARGS__) -+#else -+# define CALL_VC_V21(F,...) CALL_VC_NOOP -+#endif -+ -+ - #ifdef VC_ENABLE_API_NET - # define CALL_VC_NET(F,...) CALL_VC_GENERAL(0x00010016, net, F, __VA_ARGS__) - #else -Index: lib/nflags-net.c -=================================================================== ---- lib/nflags-net.c (revision 2366) -+++ lib/nflags-net.c (revision 2369) -@@ -30,8 +30,13 @@ - #define DECL(STR, VAL) { STR, sizeof(STR)-1, VAL } - - static struct Mapping_uint64 const VALUES[] = { --#warning Add the 'nflags' values here -- DECL("", 0) -+ DECL("lock", VC_NXF_INFO_LOCK), -+ -+ DECL("state_setup", VC_NXF_STATE_SETUP), -+ DECL("state_admin", VC_NXF_STATE_ADMIN), -+ -+ DECL("sc_helper", VC_NXF_SC_HELPER), -+ DECL("persistent", VC_NXF_PERSISTENT), - }; - - uint_least64_t -Index: lib/syscall_setsched.c -=================================================================== ---- lib/syscall_setsched.c (revision 2366) -+++ lib/syscall_setsched.c (revision 2369) -@@ -23,9 +23,7 @@ - #include "vserver.h" - #include "virtual.h" - --#if defined(VC_ENABLE_API_V13OBS) && defined(VC_ENABLE_API_V13) --# define VC_MULTIVERSION_SYSCALL 1 --#endif -+#define VC_MULTIVERSION_SYSCALL 1 - #include "vserver-internal.h" - - #ifdef VC_ENABLE_API_V13 -@@ -36,9 +34,14 @@ - # include "syscall_setsched-v13obs.hc" - #endif - -+#ifdef VC_ENABLE_API_V21 -+# include "syscall_setsched-v21.hc" -+#endif -+ - int - vc_set_sched(xid_t xid, struct vc_set_sched const *data) - { -- CALL_VC(CALL_VC_V13B (vc_set_sched,xid,data), -+ CALL_VC(CALL_VC_V21 (vc_set_sched,xid,data), -+ CALL_VC_V13B (vc_set_sched,xid,data), - CALL_VC_V13OBS(vc_set_sched,xid,data)); - } -Index: Makefile.am -=================================================================== ---- Makefile.am (revision 2366) -+++ Makefile.am (revision 2369) -@@ -58,37 +58,9 @@ - - man_MANS = - --kernel_HDRS = \ -- kernel/context.h \ -- kernel/context_cmd.h \ -- kernel/cvirt.h \ -- kernel/cvirt_cmd.h \ -- kernel/cvirt_def.h \ -- kernel/debug.h \ -- kernel/debug_cmd.h \ -- kernel/dlimit.h \ -- kernel/dlimit_cmd.h \ -- kernel/inode.h \ -- kernel/inode_cmd.h \ -- kernel/legacy.h \ -- kernel/limit.h \ -- kernel/limit_cmd.h \ -- kernel/limit_def.h \ -- kernel/limit_int.h \ -- kernel/namespace.h \ -- kernel/namespace_cmd.h \ -- kernel/network.h \ -- kernel/network_cmd.h \ -- kernel/sched.h \ -- kernel/sched_cmd.h \ -- kernel/sched_def.h \ -- kernel/signal.h \ -- kernel/signal_cmd.h \ -- kernel/switch.h \ -- kernel/xid.h -+kernel_HDRS = $(wildcard kernel/*.h) - - -- - EXTRA_PROGRAMS = - EXTRA_DIST = pathconfig.h.pathsubst \ - util-vserver.spec \ diff --git a/util-vserver/patches/0.30.211-r1/045_all_exec-limits-reset.patch b/util-vserver/patches/0.30.211-r1/045_all_exec-limits-reset.patch deleted file mode 100644 index 44409d3..0000000 --- a/util-vserver/patches/0.30.211-r1/045_all_exec-limits-reset.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: src/exec-ulimit.c -=================================================================== ---- src/exec-ulimit.c (revision 2369) -+++ src/exec-ulimit.c (revision 2370) -@@ -177,6 +177,10 @@ - Egetrlimit(LIMITS[i].code, &limit); - if (readSingleLimit(&limit, LIMITS[i].fname)) - Esetrlimit(LIMITS[i].code, &limit); -+ else { -+ limit.rlim_cur = limit.rlim_max = RLIM_INFINITY; -+ Esetrlimit(LIMITS[i].code, &limit); -+ } - } - Efchdir(cur_fd); - } diff --git a/util-vserver/patches/0.30.211-r1/215_all_shell-completion.patch b/util-vserver/patches/0.30.211-r1/215_all_shell-completion.patch deleted file mode 100644 index e130d4c..0000000 --- a/util-vserver/patches/0.30.211-r1/215_all_shell-completion.patch +++ /dev/null @@ -1,498 +0,0 @@ -Index: contrib/bash_completion -=================================================================== ---- /dev/null -+++ contrib/bash_completion -@@ -0,0 +1,300 @@ -+# Completion for the vserver command. Source this file (or on some systems -+# add it to ~/.bash_completion and start a new shell) and bash's completion -+# mechanism will know all about vserver's options! -+# -+# Copyright (C) Thomas Champagne <lafeuil@gmail.com> -+# -+# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# -+# The latest version of this software can be obtained here: -+# -+# http://linux-vserver.org/Vserver+Completion -+# -+# version 0.4.0 -+ -+have vserver-info && { -+: ${UTIL_VSERVER_VARS:=$(vserver-info - SYSINFO |grep prefix: | awk '{ print $2}')/lib/util-vserver/util-vserver-vars} -+ -+test -e "$UTIL_VSERVER_VARS" && { -+ -+. "$UTIL_VSERVER_VARS" -+. "$_LIB_FUNCTIONS" -+ -+_vserver() { -+ local cur cmds cmdOpts cmdMethodOpts helpCmds names names_pipe func i j method -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_CWORD]} -+ -+ # find available vServers: -+ # call function getAllVservers in vserver library -+ getAllVservers names -+ names_pipe=`echo ${names[@]} | sed 's/ /|/g'` -+ -+ # available commands -+ cmds='start stop restart condrestart suexec exec enter chkconfig \ -+ running status unify pkg apt-get apt-config apt-cache \ -+ rpm pkgmgmt delete' -+ -+ # options (long and short name) -+ cmdOpts='--help --version --debug --defaulttty -s --sync -v \ -+ --verbose --silent --' -+ -+ cmdMethodOpts='-m -n --context --confdir --lockfile \ -+ --hostname --netdev --netbcast --netmask \ -+ --netprefix --interface --cpuset \ -+ --cpusetcpus --cpusetmems --cpusetvirt \ -+ --initstyle --flags --help --' -+ -+ # if the previous option is a single option -+ helpCmds='--help|--version' -+ if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then -+ return 0 -+ fi -+ -+ # lookup the vServer name -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do -+ if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ #a vserver has been found -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ # Show the vserver command without build -+ case "${COMP_WORDS[i+1]}" in -+ start) -+ COMPREPLY=( $( compgen -W "--rescue --rescue-cmd" -- $cur ) ) -+ ;; -+ # No completion for apt-config -+ stop|restart|condrestart|enter|running|status|apt-config|delete) -+ ;; -+ suexec) -+ # I don't know how to do -+ COMPREPLY=( $( compgen -W -- $cur ) ) -+ ;; -+ exec) -+ #I don't know how to do -+ COMPREPLY=( $( compgen -W "" -- $cur ) ) -+ ;; -+ unify) -+ COMPREPLY=( $( compgen -W "-R" -- $cur ) ) -+ ;; -+ apt-get|apt-cache) -+ func=${COMP_WORDS[i+1]} -+ COMP_WORDS=( ${COMP_WORDS[@]:$((i+1))} ) -+ COMP_CWORD=$((COMP_CWORD-i-1)) -+ declare -f _${func//-/_} > /dev/null && _${func//-/_} -+ ;; -+ *) -+ COMPREPLY=( $( compgen -W "$cmds" -- $cur ) ) -+ ;; -+ esac -+ return 0 -+ else -+ #no vserver name found -+ prev=${COMP_WORDS[COMP_CWORD-1]} -+ -+ #search the new name of vserver -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do -+ if [[ ${COMP_WORDS[i]} == !(vserver|-*) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ j=$i -+ i=${#COMP_WORDS[@]} -+ for (( ; j < ${#COMP_WORDS[@]}-1; j++ )) ; do -+ if [[ ${COMP_WORDS[j]} == "--" ]]; then -+ # method's parameter -+ case "$method" in -+ legacy|copy) -+ ;; -+ apt-rpm) -+ COMPREPLY=( $( compgen -W "-d" -- $cur ) ) -+ ;; -+ yum) -+ COMPREPLY=( $( compgen -W "-d" -- $cur ) ) -+ ;; -+ rpm) -+ COMPREPLY=( $( compgen -W "-d --empty --force --nodeps" -- $cur ) ) -+ ;; -+ skeleton) -+ ;; -+ debootstrap) -+ COMPREPLY=( $( compgen -W "-d -m -s --" -- $cur ) ) -+ ;; -+ *) -+ ;; -+ esac -+ return 0 -+ break -+ fi -+ -+ if [[ ${COMP_WORDS[j]} == @(build|-m) ]]; then -+ i=$j -+ if (( $j+1 < ${#COMP_WORDS[@]}-1 )) ; then -+ method=${COMP_WORDS[j+1]} -+ fi -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ case $prev in -+ --help) -+ ;; -+ -n|--context|--confdir|--lockfile|--hostname|--netdev|--netbcast|--netmask|--netprefix|--interface|--cpuset|--cpusetcpus|--cpusetmems|--cpusetvirt|--initstyle|--flags) -+ COMPREPLY=( $( compgen -W "" -- $cur ) ) -+ ;; -+ -m) -+ COMPREPLY=( $( compgen -W "legacy copy apt-rpm yum rpm skeleton debootstrap" -- $cur ) ) -+ ;; -+ *) -+ COMPREPLY=( $( compgen -W "$cmdMethodOpts" -- $cur ) ) -+ ;; -+ esac -+ else -+ COMPREPLY=( $( compgen -W "build" -- $cur ) ) -+ fi -+ else -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ -+ return 0 -+ fi -+ -+ return 0 -+} -+ -+complete -F _vserver vserver -+ -+_vapt_rpm_yum() -+{ -+ local cur cmds cmdOpts helpCmds names func i -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_CWORD]} -+ -+ # options (long and short name) -+ cmdOpts='--help --version --quiet -q --all' -+ -+ # if the previous option is a single option -+ helpCmds='--help|--version' -+ -+ if [[ "${COMP_WORDS[1]}" == "@($helpCmds)" ]] ; then -+ return 0 -+ fi -+ -+ # search -- -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do -+ if [[ ${COMP_WORDS[i]} = "--" ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ # find available vServers -+ # call function getAllVservers in vserver library -+ getAllVservers names -+ names_pipe=`echo ${names[@]}" --all" | sed 's/ /|/g'` -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) && (( $i < $COMP_CWORD )) ; then -+ func=${COMP_WORDS[0]:1} -+ COMP_WORDS=( $func ${COMP_WORDS[@]:$((i+1))} ) -+ COMP_CWORD=$((COMP_CWORD-i)) -+ declare -f _${func//-/_} > /dev/null && _${func//-/_} -+ else -+ # search vServer name -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do -+ if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ if [[ "${COMP_WORDS[i]}" = "--all" ]] ; then -+ cmdOpts='--' -+ COMPREPLY=( $( compgen -W "$cmdOpts" -- $cur ) ) -+ else -+ cmdOpts='--' -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ else -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ fi -+ -+ return 0 -+} -+ -+_vserver_copy() -+{ -+ local cur prev cmdOpts helpCmds confCmds names names_pipe i -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_CWORD]} -+ -+ # find available vServers -+ # call function getAllVservers in vserver library -+ getAllVservers names -+ names_pipe=`echo ${names[@]} | sed 's/ /|/g'` -+ -+ # options (long and short name) -+ cmdOpts='--help -h --version -V --verbose -v --quiet -q \ -+ --vsroot -r --rsh -R --stopstart -s \ -+ --domain -d --ip -i' -+ -+ # if the previous option is a single option -+ helpCmds='--help|-h|--version|-V' -+ -+ if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then -+ return 0 -+ fi -+ -+ confCmds='--ip|-i|--domain|-d' -+ prev=${COMP_WORDS[COMP_CWORD-1]} -+ -+ if [[ $prev == @($confCmds) ]] ; then -+ return 0 -+ fi -+ -+ # search a vServer name -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do -+ if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ return 0 -+ else -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ -+ return 0 -+} -+ -+complete -F _vapt_rpm_yum vapt-get -+complete -F _vapt_rpm_yum vrpm -+complete -F _vapt_rpm_yum vyum -+complete -F _vserver_copy vserver-copy -+ -+} -+} -Index: contrib/zsh_completion -=================================================================== ---- /dev/null -+++ contrib/zsh_completion -@@ -0,0 +1,188 @@ -+#compdef vserver -+ -+# Copyright (C) 2005 intrigeri@boum.org - property is theft ! -+# -+# 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., -+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+# ,---- -+# | NOTES -+# `---- -+# -+# - SVN version: $Id$ -+# - $URL$ -+# - Tested on Debian GNU/Linux with util-vserver 0.30.209. -+# -+# ,---- -+# | TODO -+# `---- -+# - Use util-vserver shell functions library, as does the Bash -+# completion script found on /usr/lib/util-vserver/functions -+# - Implement commands arguments completion. -+# -+ -+### -+### Main completion function -+### -+ -+_vserver () { -+ -+ # local variables -+ local curcontext="$curcontext" state line expl ret=1 -+ local cmd=$words[3] -+ -+ # dispatch -+ case "$cmd" in -+ apt-cache|apt-config|apt-get) -+ compset -n 3 -+ _dispatch $cmd:t $cmd $cmd:t -default- && ret=0 -+ ;; -+ exec) -+ _arguments -C \ -+ '1: :->vsnames' \ -+ '2: :->cmds' \ -+ '3:command name: _command_names -e' \ -+ '*::arguments: _normal' && ret=0 -+ ;; -+ stop|restart|condrestart|enter|running|status) -+ _arguments -C \ -+ '1: :->vsnames' \ -+ '2: :->cmds' \ -+ '*::arguments: _message "no more arguments"' && ret=0 -+ ;; -+ *) -+ _arguments -C \ -+ '(-)--help[print help information]' \ -+ '(- *)--version[print client version information]' \ -+ '1: :->vsnames' \ -+ '2: :->cmds' \ -+ '*:: :->args' && ret=0 -+ ;; -+ esac -+ -+ # cache initialization -+ if [[ -n "$state" ]]; then -+ if (( ! $+_cache_vserver_cfgdir )); then -+ typeset -g _cache_vserver_cfgdir_initialized -+ _vserver_cache_cfgdir -+ fi -+ if (( ! $+_cache_vserver_vsnames )); then -+ typeset -g _cache_vserver_vsnames_initialized -+ _vserver_cache_vsnames -+ fi -+ if (( ! $+_cache_vserver_cmds )); then -+ typeset -g _cache_vserver_cmds_initialized -+ _vserver_cache_cmds -+ fi -+ fi -+ -+ case "$state" in -+ vsnames) -+ _wanted commands expl 'vserver name' _vserver_vsnames && ret=0 -+ ;; -+ cmds) -+ _wanted commands expl 'vserver command' _vserver_commands && ret=0 -+ ;; -+ args) -+ local args -+ if $+args; then -+ _arguments "$args[@]" && ret=0 -+ else -+ ret=0 -+ fi -+ ;; -+ esac -+ -+ return ret -+} -+ -+### -+### Auxiliary completion functions -+### -+ -+(( $+functions[_vserver_commands] )) || -+_vserver_commands() { -+ compadd "$@" -k _cache_vserver_cmds || compadd "$@" ${(s.:.)_cache_vserver_cmds} -+} -+ -+(( $+functions[_vserver_vsnames] )) || -+_vserver_vsnames() { -+ local expl -+ _wanted vserver expl 'vserver name' compadd -S '' $_cache_vserver_vsnames[@] -+} -+ -+### -+### Cache functions -+### -+ -+(( $+functions[_vserver_cache_cfgdir] )) || -+_vserver_cache_cfgdir() { -+ if [[ "$_cache_vserver_cfgdir_initialized" != true ]]; then -+ typeset -ga _cache_vserver_cfgdir -+ _cache_vserver_cfgdir=`vserver-info info SYSINFO | grep '^ *cfg-Directory' | awk '{print $2}'` -+ _cache_vserver_cfgdir_initialized=true -+ fi -+} -+ -+(( $+functions[_vserver_cache_vsnames] )) || -+_vserver_cache_vsnames() { -+ if [[ "$_cache_vserver_vsnames_initialized" != true ]]; then -+ typeset -ga _cache_vserver_vsnames -+ _cache_vserver_vsnames=( $(ls -d $_cache_vserver_cfgdir/*/ | sed -e s,$_cache_vserver_cfgdir,, | tr -d '/') ) -+ _cache_vserver_vsnames_initialized=true -+ fi -+} -+ -+(( $+functions[_vserver_cache_cmds] )) || -+_vserver_cache_cmds() { -+ if [[ "$_cache_vserver_cmds_initialized" != true ]]; then -+ typeset -ga _cache_vserver_cmds -+ _cache_vserver_cmds=( -+ start -+ stop -+ restart -+ condrestart -+ suexec -+ exec -+ enter -+ chkconfig -+ running -+ status -+ build -+ unify -+ pkg -+ apt-get -+ apt-config -+ apt-cache -+ rpm -+ pkgmgmt -+ ) -+ _cache_vserver_cmds_initialized=true -+ fi -+} -+ -+### -+### Main function call -+### -+ -+_vserver "$@" -+ -+### -+### Emacs variables -+### -+ -+# Local Variables: -+# mode:sh -+# sh-basic-offset: 2 -+# End: diff --git a/util-vserver/patches/0.30.211/000_README b/util-vserver/patches/0.30.211/000_README deleted file mode 100644 index 5e83810..0000000 --- a/util-vserver/patches/0.30.211/000_README +++ /dev/null @@ -1,18 +0,0 @@ -Numbering scheme --------------------------------------- -FIXES -000_all - 195_all - -FEATURES -200_all - 395_all - -Patch descriptions: --------------------------------------- - -Patch: 210_all_gentoo-tools.patch -From: Benedikt Boehm and Christian Heim -Desc: Adding various Gentoo related scripts (vemerge, vdispatch-conf, ...) - -Patch: 215_all_shell-completion.patch -From: Thomas Champagne and Ben Voui(?) -Desc: Adding bash/zsh completion scripts diff --git a/util-vserver/patches/0.30.211/210_all_gentoo-tools.patch b/util-vserver/patches/0.30.211/210_all_gentoo-tools.patch deleted file mode 100644 index 5ab120f..0000000 --- a/util-vserver/patches/0.30.211/210_all_gentoo-tools.patch +++ /dev/null @@ -1,74 +0,0 @@ -Index: util-vserver/scripts/Makefile-files -=================================================================== ---- util-vserver.orig/scripts/Makefile-files -+++ util-vserver/scripts/Makefile-files -@@ -38,6 +38,7 @@ AM_INSTALLCHECK_STD_OPTIONS_EXEMPT += \ - - - scripts_pkglib_src_DTA = scripts/functions \ -+ scripts/gentoo-functions.sh \ - scripts/magic.mime \ - scripts/vserver-build.apt-rpm \ - scripts/vserver-build.skeleton \ -@@ -72,6 +73,7 @@ scripts_pkglib_src_SCRPTS = scripts/pkgm - scripts/vservers.grabinfo.sh \ - scripts/vshelper \ - scripts/vsysvwrapper \ -+ scripts/vschedcalc \ - scripts/vyum-worker - - scripts_legacy_src_SCRPTS = scripts/legacy/save_s_context \ -@@ -89,7 +91,12 @@ scripts_sbin_src_PRGS = scripts/chconte - scripts/vserver \ - scripts/vsomething \ - scripts/vtop \ -- scripts/vyum -+ scripts/vyum \ -+ scripts/vdispatch-conf \ -+ scripts/vemerge \ -+ scripts/vesync \ -+ scripts/vserver-new \ -+ scripts/vupdateworld - - scripts_sbin_gen_PRGS = - scripts_sbincfg_gen_DTA = -Index: util-vserver/scripts/util-vserver-vars.pathsubst -=================================================================== ---- util-vserver.orig/scripts/util-vserver-vars.pathsubst -+++ util-vserver/scripts/util-vserver-vars.pathsubst -@@ -44,6 +44,7 @@ _INITSYNC_MINIT_START=: - _KEEP_CTX_ALIVE="$__PKGLIBDIR/keep-ctx-alive" - _LIB_FUNCTIONS="$__PKGLIBDIR/functions" - _LIB_MAGIC="$__PKGLIBDIR/magic" -+_LIB_GENTOO_FUNCTIONS="$__PKGLIBDIR/gentoo-functions.sh" - _LIB_VSERVER_SETUP_FUNCTIONS="$__PKGLIBDIR/vserver-setup.functions" - _LIB_VSERVER_BUILD_FUNCTIONS="$__PKGLIBDIR/vserver-build.functions" - _LIB_VSERVER_BUILD_FUNCTIONS_APT="$__PKGLIBDIR/vserver-build.functions.apt" -@@ -69,6 +70,9 @@ _VAPT_GET_WORKER="$__PKGLIBDIR/vapt-get- - _VATTRIBUTE="$__SBINDIR/vattribute" - _VCONTEXT="$__SBINDIR/vcontext" - _VDLIMIT="$__SBINDIR/vdlimit" -+_VDISPATCH_CONF="$__SBINDIR/vdispatch-conf" -+_VEMERGE="$__SBINDIR/vemerge" -+_VESYNC="$__SBINDIR/vesync" - _VDU="$__SBINDIR/vdu" - _VHASHIFY="$__PKGLIBDIR/vhashify" - _VKILL="$__SBINDIR/vkill" -@@ -82,7 +86,9 @@ _VRPM="$__SBINDIR/vrpm" - _VRPM_PRELOAD="$__PKGLIBDIR/vrpm-preload" - _VRPM_WORKER="$__PKGLIBDIR/vrpm-worker" - _VSCHED="$__SBINDIR/vsched" -+_VSCHEDCALC="$__PKGLIBDIR/vschedcalc" - _VSERVER="$__SBINDIR/vserver" -+_VSERVER_NEW="$__SBINDIR/vserver-new" - _VSERVER_LEGACY="$__LEGACYDIR/vserver" - _VSERVER_BUILD="$__PKGLIBDIR/vserver-build" - _VSERVER_INFO="$__SBINDIR/vserver-info" -@@ -93,6 +99,7 @@ _VSOMETHING="$__SBINDIR/vsomething" - _VWAIT="$__SBINDIR/vwait" - _VUNAME="$__SBINDIR/vuname" - _VUNIFY="$__PKGLIBDIR/vunify" -+_VUPDATEWORLD="$__SBINDIR/vupdateworld" - _VYUM="$__SBINDIR/vyum" - _VYUM_WORKER="$__PKGLIBDIR/vyum-worker" - diff --git a/util-vserver/patches/0.30.211/215_all_shell-completion.patch b/util-vserver/patches/0.30.211/215_all_shell-completion.patch deleted file mode 100644 index e130d4c..0000000 --- a/util-vserver/patches/0.30.211/215_all_shell-completion.patch +++ /dev/null @@ -1,498 +0,0 @@ -Index: contrib/bash_completion -=================================================================== ---- /dev/null -+++ contrib/bash_completion -@@ -0,0 +1,300 @@ -+# Completion for the vserver command. Source this file (or on some systems -+# add it to ~/.bash_completion and start a new shell) and bash's completion -+# mechanism will know all about vserver's options! -+# -+# Copyright (C) Thomas Champagne <lafeuil@gmail.com> -+# -+# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# -+# The latest version of this software can be obtained here: -+# -+# http://linux-vserver.org/Vserver+Completion -+# -+# version 0.4.0 -+ -+have vserver-info && { -+: ${UTIL_VSERVER_VARS:=$(vserver-info - SYSINFO |grep prefix: | awk '{ print $2}')/lib/util-vserver/util-vserver-vars} -+ -+test -e "$UTIL_VSERVER_VARS" && { -+ -+. "$UTIL_VSERVER_VARS" -+. "$_LIB_FUNCTIONS" -+ -+_vserver() { -+ local cur cmds cmdOpts cmdMethodOpts helpCmds names names_pipe func i j method -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_CWORD]} -+ -+ # find available vServers: -+ # call function getAllVservers in vserver library -+ getAllVservers names -+ names_pipe=`echo ${names[@]} | sed 's/ /|/g'` -+ -+ # available commands -+ cmds='start stop restart condrestart suexec exec enter chkconfig \ -+ running status unify pkg apt-get apt-config apt-cache \ -+ rpm pkgmgmt delete' -+ -+ # options (long and short name) -+ cmdOpts='--help --version --debug --defaulttty -s --sync -v \ -+ --verbose --silent --' -+ -+ cmdMethodOpts='-m -n --context --confdir --lockfile \ -+ --hostname --netdev --netbcast --netmask \ -+ --netprefix --interface --cpuset \ -+ --cpusetcpus --cpusetmems --cpusetvirt \ -+ --initstyle --flags --help --' -+ -+ # if the previous option is a single option -+ helpCmds='--help|--version' -+ if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then -+ return 0 -+ fi -+ -+ # lookup the vServer name -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do -+ if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ #a vserver has been found -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ # Show the vserver command without build -+ case "${COMP_WORDS[i+1]}" in -+ start) -+ COMPREPLY=( $( compgen -W "--rescue --rescue-cmd" -- $cur ) ) -+ ;; -+ # No completion for apt-config -+ stop|restart|condrestart|enter|running|status|apt-config|delete) -+ ;; -+ suexec) -+ # I don't know how to do -+ COMPREPLY=( $( compgen -W -- $cur ) ) -+ ;; -+ exec) -+ #I don't know how to do -+ COMPREPLY=( $( compgen -W "" -- $cur ) ) -+ ;; -+ unify) -+ COMPREPLY=( $( compgen -W "-R" -- $cur ) ) -+ ;; -+ apt-get|apt-cache) -+ func=${COMP_WORDS[i+1]} -+ COMP_WORDS=( ${COMP_WORDS[@]:$((i+1))} ) -+ COMP_CWORD=$((COMP_CWORD-i-1)) -+ declare -f _${func//-/_} > /dev/null && _${func//-/_} -+ ;; -+ *) -+ COMPREPLY=( $( compgen -W "$cmds" -- $cur ) ) -+ ;; -+ esac -+ return 0 -+ else -+ #no vserver name found -+ prev=${COMP_WORDS[COMP_CWORD-1]} -+ -+ #search the new name of vserver -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do -+ if [[ ${COMP_WORDS[i]} == !(vserver|-*) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ j=$i -+ i=${#COMP_WORDS[@]} -+ for (( ; j < ${#COMP_WORDS[@]}-1; j++ )) ; do -+ if [[ ${COMP_WORDS[j]} == "--" ]]; then -+ # method's parameter -+ case "$method" in -+ legacy|copy) -+ ;; -+ apt-rpm) -+ COMPREPLY=( $( compgen -W "-d" -- $cur ) ) -+ ;; -+ yum) -+ COMPREPLY=( $( compgen -W "-d" -- $cur ) ) -+ ;; -+ rpm) -+ COMPREPLY=( $( compgen -W "-d --empty --force --nodeps" -- $cur ) ) -+ ;; -+ skeleton) -+ ;; -+ debootstrap) -+ COMPREPLY=( $( compgen -W "-d -m -s --" -- $cur ) ) -+ ;; -+ *) -+ ;; -+ esac -+ return 0 -+ break -+ fi -+ -+ if [[ ${COMP_WORDS[j]} == @(build|-m) ]]; then -+ i=$j -+ if (( $j+1 < ${#COMP_WORDS[@]}-1 )) ; then -+ method=${COMP_WORDS[j+1]} -+ fi -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ case $prev in -+ --help) -+ ;; -+ -n|--context|--confdir|--lockfile|--hostname|--netdev|--netbcast|--netmask|--netprefix|--interface|--cpuset|--cpusetcpus|--cpusetmems|--cpusetvirt|--initstyle|--flags) -+ COMPREPLY=( $( compgen -W "" -- $cur ) ) -+ ;; -+ -m) -+ COMPREPLY=( $( compgen -W "legacy copy apt-rpm yum rpm skeleton debootstrap" -- $cur ) ) -+ ;; -+ *) -+ COMPREPLY=( $( compgen -W "$cmdMethodOpts" -- $cur ) ) -+ ;; -+ esac -+ else -+ COMPREPLY=( $( compgen -W "build" -- $cur ) ) -+ fi -+ else -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ -+ return 0 -+ fi -+ -+ return 0 -+} -+ -+complete -F _vserver vserver -+ -+_vapt_rpm_yum() -+{ -+ local cur cmds cmdOpts helpCmds names func i -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_CWORD]} -+ -+ # options (long and short name) -+ cmdOpts='--help --version --quiet -q --all' -+ -+ # if the previous option is a single option -+ helpCmds='--help|--version' -+ -+ if [[ "${COMP_WORDS[1]}" == "@($helpCmds)" ]] ; then -+ return 0 -+ fi -+ -+ # search -- -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do -+ if [[ ${COMP_WORDS[i]} = "--" ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ # find available vServers -+ # call function getAllVservers in vserver library -+ getAllVservers names -+ names_pipe=`echo ${names[@]}" --all" | sed 's/ /|/g'` -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) && (( $i < $COMP_CWORD )) ; then -+ func=${COMP_WORDS[0]:1} -+ COMP_WORDS=( $func ${COMP_WORDS[@]:$((i+1))} ) -+ COMP_CWORD=$((COMP_CWORD-i)) -+ declare -f _${func//-/_} > /dev/null && _${func//-/_} -+ else -+ # search vServer name -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )) ; do -+ if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ if [[ "${COMP_WORDS[i]}" = "--all" ]] ; then -+ cmdOpts='--' -+ COMPREPLY=( $( compgen -W "$cmdOpts" -- $cur ) ) -+ else -+ cmdOpts='--' -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ else -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ fi -+ -+ return 0 -+} -+ -+_vserver_copy() -+{ -+ local cur prev cmdOpts helpCmds confCmds names names_pipe i -+ -+ COMPREPLY=() -+ cur=${COMP_WORDS[COMP_CWORD]} -+ -+ # find available vServers -+ # call function getAllVservers in vserver library -+ getAllVservers names -+ names_pipe=`echo ${names[@]} | sed 's/ /|/g'` -+ -+ # options (long and short name) -+ cmdOpts='--help -h --version -V --verbose -v --quiet -q \ -+ --vsroot -r --rsh -R --stopstart -s \ -+ --domain -d --ip -i' -+ -+ # if the previous option is a single option -+ helpCmds='--help|-h|--version|-V' -+ -+ if [[ ${COMP_WORDS[1]} == @($helpCmds) ]] ; then -+ return 0 -+ fi -+ -+ confCmds='--ip|-i|--domain|-d' -+ prev=${COMP_WORDS[COMP_CWORD-1]} -+ -+ if [[ $prev == @($confCmds) ]] ; then -+ return 0 -+ fi -+ -+ # search a vServer name -+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do -+ if [[ ${COMP_WORDS[i]} == @($names_pipe) ]] ; then -+ # found it! -+ break -+ fi -+ done -+ -+ if (( $i < ${#COMP_WORDS[@]}-1 )) ; then -+ return 0 -+ else -+ COMPREPLY=( $( compgen -W "${names[@]} $cmdOpts" -- $cur ) ) -+ fi -+ -+ return 0 -+} -+ -+complete -F _vapt_rpm_yum vapt-get -+complete -F _vapt_rpm_yum vrpm -+complete -F _vapt_rpm_yum vyum -+complete -F _vserver_copy vserver-copy -+ -+} -+} -Index: contrib/zsh_completion -=================================================================== ---- /dev/null -+++ contrib/zsh_completion -@@ -0,0 +1,188 @@ -+#compdef vserver -+ -+# Copyright (C) 2005 intrigeri@boum.org - property is theft ! -+# -+# 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., -+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+ -+# ,---- -+# | NOTES -+# `---- -+# -+# - SVN version: $Id$ -+# - $URL$ -+# - Tested on Debian GNU/Linux with util-vserver 0.30.209. -+# -+# ,---- -+# | TODO -+# `---- -+# - Use util-vserver shell functions library, as does the Bash -+# completion script found on /usr/lib/util-vserver/functions -+# - Implement commands arguments completion. -+# -+ -+### -+### Main completion function -+### -+ -+_vserver () { -+ -+ # local variables -+ local curcontext="$curcontext" state line expl ret=1 -+ local cmd=$words[3] -+ -+ # dispatch -+ case "$cmd" in -+ apt-cache|apt-config|apt-get) -+ compset -n 3 -+ _dispatch $cmd:t $cmd $cmd:t -default- && ret=0 -+ ;; -+ exec) -+ _arguments -C \ -+ '1: :->vsnames' \ -+ '2: :->cmds' \ -+ '3:command name: _command_names -e' \ -+ '*::arguments: _normal' && ret=0 -+ ;; -+ stop|restart|condrestart|enter|running|status) -+ _arguments -C \ -+ '1: :->vsnames' \ -+ '2: :->cmds' \ -+ '*::arguments: _message "no more arguments"' && ret=0 -+ ;; -+ *) -+ _arguments -C \ -+ '(-)--help[print help information]' \ -+ '(- *)--version[print client version information]' \ -+ '1: :->vsnames' \ -+ '2: :->cmds' \ -+ '*:: :->args' && ret=0 -+ ;; -+ esac -+ -+ # cache initialization -+ if [[ -n "$state" ]]; then -+ if (( ! $+_cache_vserver_cfgdir )); then -+ typeset -g _cache_vserver_cfgdir_initialized -+ _vserver_cache_cfgdir -+ fi -+ if (( ! $+_cache_vserver_vsnames )); then -+ typeset -g _cache_vserver_vsnames_initialized -+ _vserver_cache_vsnames -+ fi -+ if (( ! $+_cache_vserver_cmds )); then -+ typeset -g _cache_vserver_cmds_initialized -+ _vserver_cache_cmds -+ fi -+ fi -+ -+ case "$state" in -+ vsnames) -+ _wanted commands expl 'vserver name' _vserver_vsnames && ret=0 -+ ;; -+ cmds) -+ _wanted commands expl 'vserver command' _vserver_commands && ret=0 -+ ;; -+ args) -+ local args -+ if $+args; then -+ _arguments "$args[@]" && ret=0 -+ else -+ ret=0 -+ fi -+ ;; -+ esac -+ -+ return ret -+} -+ -+### -+### Auxiliary completion functions -+### -+ -+(( $+functions[_vserver_commands] )) || -+_vserver_commands() { -+ compadd "$@" -k _cache_vserver_cmds || compadd "$@" ${(s.:.)_cache_vserver_cmds} -+} -+ -+(( $+functions[_vserver_vsnames] )) || -+_vserver_vsnames() { -+ local expl -+ _wanted vserver expl 'vserver name' compadd -S '' $_cache_vserver_vsnames[@] -+} -+ -+### -+### Cache functions -+### -+ -+(( $+functions[_vserver_cache_cfgdir] )) || -+_vserver_cache_cfgdir() { -+ if [[ "$_cache_vserver_cfgdir_initialized" != true ]]; then -+ typeset -ga _cache_vserver_cfgdir -+ _cache_vserver_cfgdir=`vserver-info info SYSINFO | grep '^ *cfg-Directory' | awk '{print $2}'` -+ _cache_vserver_cfgdir_initialized=true -+ fi -+} -+ -+(( $+functions[_vserver_cache_vsnames] )) || -+_vserver_cache_vsnames() { -+ if [[ "$_cache_vserver_vsnames_initialized" != true ]]; then -+ typeset -ga _cache_vserver_vsnames -+ _cache_vserver_vsnames=( $(ls -d $_cache_vserver_cfgdir/*/ | sed -e s,$_cache_vserver_cfgdir,, | tr -d '/') ) -+ _cache_vserver_vsnames_initialized=true -+ fi -+} -+ -+(( $+functions[_vserver_cache_cmds] )) || -+_vserver_cache_cmds() { -+ if [[ "$_cache_vserver_cmds_initialized" != true ]]; then -+ typeset -ga _cache_vserver_cmds -+ _cache_vserver_cmds=( -+ start -+ stop -+ restart -+ condrestart -+ suexec -+ exec -+ enter -+ chkconfig -+ running -+ status -+ build -+ unify -+ pkg -+ apt-get -+ apt-config -+ apt-cache -+ rpm -+ pkgmgmt -+ ) -+ _cache_vserver_cmds_initialized=true -+ fi -+} -+ -+### -+### Main function call -+### -+ -+_vserver "$@" -+ -+### -+### Emacs variables -+### -+ -+# Local Variables: -+# mode:sh -+# sh-basic-offset: 2 -+# End: diff --git a/util-vserver/tools/gentoo-functions.sh b/util-vserver/tools/gentoo-functions.sh deleted file mode 100644 index 9cdf45d..0000000 --- a/util-vserver/tools/gentoo-functions.sh +++ /dev/null @@ -1,150 +0,0 @@ -#!/bin/bash -# -# gentoo-functions.sh - shared functions util-vserver on gentoo -# Copyright (C) 2005 Benedikt Boehm <hollow@gentoo.org> -# -# 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 - -if [ ! -e /sbin/functions.sh ]; then - echo "/sbin/functions.sh missing. Are you running Gentoo?" - exit 1 -fi - -[ -z "${RC_GOT_FUNCTIONS}" ] && source /sbin/functions.sh - -die() { - eerror ${1:-<no error message>} - einfo "Type ${APP} --help for details" - - exit ${2:-1} -} - -vs_list_proc() { - find /proc/virtual/ -noleaf -mindepth 1 -maxdepth 1 -type d -exec basename {} \; -} - -vs_is_running_xid() { -# $1 - xid - [ -z "$1" ] && return 1 - [ -d /proc/virtual/${1} ] -} - -vs_is_running_name() { -# $1 - name -# $2 - do not trust util-vserver - [ -z "$1" ] && return 1 - - if [ -n "$2" ]; then - for name in $(vs_running_name true); do - [ "${name}" == "$1" ] && return 0 - done - return 1 - else - [ -d /var/run/vservers/${1} ] - return $? - fi -} - -vs_running_xid() { -# $1 - do not trust util-vserver - if [ -n "$1" ]; then - vs_list_proc - else - ls /var/run/vservers.rev - fi -} - -vs_running_name() { -# $1 - do not trust util-vserver - if [ -n "$1" ]; then - for xid in $(vs_list_proc); do - vs_xid2name ${xid} true - done - else - ls /var/run/vservers - fi -} - -vs_xid2name() { -# $1 - xid -# $2 - do not trust util-vserver - if [ -n "$2" ]; then - basename $(vuname -g --xid ${1} CONTEXT) - else - basename $(readlink /var/run/vservers.rev/${1}) - fi -} - -vs_name2xid() { -# $1 - name -# $2 - do not trust util-vserver - if [ -n "$2" ]; then - for xid in $(vs_list_proc); do - if [ "$(vs_xid2name ${xid} true)" == "$1" ]; then - echo ${xid} - break; - fi - done - else - cat /var/run/vservers/${1} - fi -} - -unpack() { - local x - local y - local myfail - local tarvars - - [ -z "$*" ] && die "Nothing passed to the 'unpack' command" - - for x in "$@"; do - myfail="unpacking ${x} failed" - y="${x%.*}" - y="${y##*.}" - - case "${x##*.}" in - tar) - tar xf "${DISTDIR}/${x}" ${tarvars} || die "$myfail" - ;; - tgz) - tar xzf "${DISTDIR}/${x}" ${tarvars} || die "$myfail" - ;; - tbz2) - bzip2 -dc "${DISTDIR}/${x}" | tar xf - ${tarvars} || die "$myfail" - ;; - ZIP|zip) - unzip -qo "${DISTDIR}/${x}" || die "$myfail" - ;; - gz|Z|z) - if [ "${y}" == "tar" ]; then - tar xzf "${DISTDIR}/${x}" ${tarvars} || die "$myfail" - else - gzip -dc "${DISTDIR}/${x}" > ${x%.*} || die "$myfail" - fi - ;; - bz2) - if [ "${y}" == "tar" ]; then - bzip2 -dc "${DISTDIR}/${x}" | tar xf - ${tarvars} || die "$myfail" - else - bzip2 -dc "${DISTDIR}/${x}" > ${x%.*} || die "$myfail" - fi - ;; - *) - die "unpack ${x}: file format not recognized." - ;; - esac - done -} diff --git a/util-vserver/tools/vdispatch-conf b/util-vserver/tools/vdispatch-conf deleted file mode 100755 index 5949887..0000000 --- a/util-vserver/tools/vdispatch-conf +++ /dev/null @@ -1,126 +0,0 @@ -#!/bin/bash -# -# vdispatch-conf - Update config files in vservers -# Copyright (C) 2005 Benedikt Boehm <hollow@gentoo.org> -# Christian Heim <phreak@gentoo.org> -# -# 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 - -: ${APP:=${0##*/}} -: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} - -if [ ! -e ${UTIL_VSERVER_VARS} ]; then - echo "Cannot find util-vserver installation" - echo "(the file '$UTIL_VSERVER_VARS' would be expected)" - exit 1 -fi - -source ${UTIL_VSERVER_VARS} - -if [ ! -e ${_LIB_GENTOO_FUNCTIONS} ]; then - echo "${_LIB_GENTOO_FUNCTIONS} missing. Are you running Gentoo?" - exit 1 -fi - -source ${_LIB_GENTOO_FUNCTIONS} - -trap "exit 1" INT - -dispatchconf() { -# $1 - name of the vserver - einfo "Updating config files for '${1}'" - /usr/sbin/vserver ${1} exec /usr/sbin/dispatch-conf - echo -} - -usage() { - echo "Usage: vupdateworld <opts> [<name>]" - echo - echo "<name> Name of the vserver (required if --all not used)" - echo - echo "Options:" - echo " -h, --help This help message" - echo " -a, --all Update all running vservers" - echo " -e, --exclude <list> Exclude single vservers with --all" - echo -} - -# Parsing opts -opts=$(POSIXLY_CORRECT=1 getopt -o hae: --longoptions help,all,exclude: -n $0 -- "$@") - -[ "$?" != "0" ] && die "Wrong number of options" - -eval set -- "$opts" - -all=0 -exclude= - -while true; do - case "${1}" in - --help|-h) - usage - exit 0 - ;; - --all|-a) - all=1 - shift - ;; - --exclude|-e) - exclude=$2 - shift 2 - ;; - --) - shift - break - ;; - *) - die "Unknown argument '${1}'" - ;; - esac -done - -# checking vserver name -name= -if [ -z "$1" ] && [ ${all} -eq 0 ]; then - die "Missing argument <name>" -else - name=$1 -fi -shift - -# get list of all running vservers -if [ ${all} -eq 0 ]; then - vservers=${name} -else - running=$(vs_running_name) - vservers= - - for r in ${running}; do - match=0 - - for e in ${exclude}; do - [ "${r}" == "${e}" ] && match=1 - done - - [ ! -f "${__CONFDIR}/${r}/vdir/etc/gentoo-release" ] && match=1 - - [ ${match} -eq 0 ] && vservers="${vservers} ${r}" - done -fi - -# finally, update configs -for vserver in ${vservers}; do - dispatchconf ${vserver} -done diff --git a/util-vserver/tools/vemerge b/util-vserver/tools/vemerge deleted file mode 100755 index 15ed623..0000000 --- a/util-vserver/tools/vemerge +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# vdispatch-conf - Update config files inside vservers -# Copyright (C) 2005 Benedikt Boehm <hollow@gentoo.org> -# -# 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 - -if [ -n "${1}" ]; then - name=${1} - shift - /usr/sbin/vserver ${name} exec /usr/bin/emerge "$@" -else - echo "Usage: vemerge <name> <emergeopts>" - exit 1 -fi diff --git a/util-vserver/tools/vesync b/util-vserver/tools/vesync deleted file mode 100755 index 33a202d..0000000 --- a/util-vserver/tools/vesync +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/bash -# -# vesync - Sync metadata and overlays in vservers -# Copyright (C) 2005 Benedikt Boehm <hollow@gentoo.org> -# Christian Heim <phreak@gentoo.org> -# -# 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 - -: ${APP:=${0##*/}} -: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} - -if [ ! -e ${UTIL_VSERVER_VARS} ]; then - echo "Cannot find util-vserver installation" - echo "(the file '$UTIL_VSERVER_VARS' would be expected)" - exit 1 -fi - -source ${UTIL_VSERVER_VARS} - -if [ ! -e ${_LIB_GENTOO_FUNCTIONS} ]; then - echo "${_LIB_GENTOO_FUNCTIONS} missing. Are you running Gentoo?" - exit 1 -fi - -source ${_LIB_GENTOO_FUNCTIONS} - -trap "exit 1" INT - -syncportage() { -# $1 - name of the vserver - ebegin "Updating metadata for vserver '${1}'" - /usr/sbin/vserver ${1} exec /usr/bin/emerge --metadata >&9 - eend $? || die -} - -syncoverlay() { -# $1 - name of the vserver -# $2 - overlayhost (e.g. rsync://rsync.de.gentoo.org/gentoo-overlay) -# $3 - overlay directory (e.g. /usr/local/portage) - ebegin "Syncing overlay '${3}' for vserver '${1}'" - /usr/sbin/vserver ${1} exec /usr/bin/rsync -rtW --progress --delete \ - --delete-after ${2}/ ${3}/ >&9 - eend $? || die -} - -usage() { - echo "Usage: vesync <opts> [<name>]" - echo - echo "<name> Name of the vserver (required if --all not used)" - echo - echo "Options:" - echo " -h, --help This help message" - echo " -q, --quiet Don't show output of emerge" - echo " -a, --all Sync all running vservers" - echo " -e, --exclude <list> Exclude single vservers with --all" - echo " --overlay Directory of a portage overlay" - echo " --overlay-host Rsync host of the overlay" - echo " --overlay-only Only sync the overlay" - echo -} - -# Parsing opts -opts=$(POSIXLY_CORRECT=1 getopt -o hqae --longoptions help,quiet,all,exclude:,overlay,overlay-host,overlay-only -n $0 -- "$@") - -[ "$?" != "0" ] && die "Wrong number of options" - -eval set -- "$opts" - -quiet=0 -all=0 -exclude= -overlay= -overlay_host= -overlay_only=0 - -while true; do - case "${1}" in - --help|-h) - usage - exit 0 - ;; - --quiet|-q) - quiet=1 - shift - ;; - --all|-a) - all=1 - shift - ;; - --exclude|-e) - exclude=$2 - shift 2 - ;; - --overlay) - overlay=${2%/} - shift 2 - ;; - --overlay-host) - overlay_host=${2%/} - shift 2 - ;; - --overlay-only) - overlay_only=1 - shift - ;; - --) - shift - break - ;; - *) - die "Unknown argument '${1}'" - ;; - esac -done - -# checking quiet option -if [ ${quiet} -eq 0 ]; then - exec 9>&1 -else - exec 9>/dev/null 2>&1 -fi - -# checking vserver name -name= -if [ -z "$1" ] && [ ${all} -eq 0 ]; then - die "Missing argument <name>" -else - name=$1 -fi -shift - -# get list of all running vservers -if [ ${all} -eq 0 ]; then - vservers=${name} -else - running=$(vs_running_name) - vservers= - - for r in ${running}; do - match=0 - - for e in ${exclude}; do - [ "${r}" == "${e}" ] && match=1 - done - - [ ! -f "${__CONFDIR}/${r}/vdir/etc/gentoo-release" ] && match=1 - - [ ${match} -eq 0 ] && vservers="${vservers} ${r}" - done -fi - -# finally, sync it! -for vserver in ${vservers}; do - [ ${overlay_only} -eq 0 ] && syncportage ${vserver} - - if [ -n "${overlay_host}" ] && [ -n "${overlay}" ]; then - syncoverlay ${vserver} ${overlay_host} ${overlay} - fi -done diff --git a/util-vserver/tools/vschedcalc b/util-vserver/tools/vschedcalc deleted file mode 100755 index ce4f6c6..0000000 --- a/util-vserver/tools/vschedcalc +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -# -# vschedcalc - Calculate token buckets -# Copyright (C) 2005 Benedikt Boehm <hollow@gentoo.org> -# -# 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 - -trap "exit 1" INT - -echo ">> Welcome to the token bucket calculator" -echo ">> You need to enter some configuration options" -echo " Default values are shown in brackets" -echo - -# get config values -echo -n "Kernel HZ value (1000): " -read hz - -[ -z "${hz}" ] && hz=1000 - -while true; do - echo -n "Fill rate: " - read fillrate - [ -n "${fillrate}" ] && break - echo "!! Please enter a valid fill rate" -done - -while true; do - echo -n "Avg. CPU usage in %: " - read avgcpu - [ -n "${avgcpu}" ] && break - echo "!! Please enter a valid CPU usage" -done - -while true; do - echo -n "Max. burst time in sec: " - read maxburst - [ -n "${maxburst}" ] && break - echo "!! Please enter a valid burst time" -done - -echo -n "Hold processes after burst in sec (0): " -read bursthold - -[ -z "${bursthold}" ] && bursthold=0 - -# calculate token bucket -let interval=100*${fillrate}/${avgcpu} -let tokensmin=${hz}*${bursthold}*${fillrate}/${interval} -let tokensmax=${hz}*${maxburst}-${hz}*${maxburst}*${fillrate}/${interval} - -echo -echo ">> Voila. Your token bucket looks like:" -echo "FillRate: ${fillrate}" -echo "Interval: ${interval}" -echo "TokensMin: ${tokensmin}" -echo "TokensMax: ${tokensmax}" diff --git a/util-vserver/tools/vserver-new b/util-vserver/tools/vserver-new deleted file mode 100755 index 51f554e..0000000 --- a/util-vserver/tools/vserver-new +++ /dev/null @@ -1,538 +0,0 @@ -#!/bin/bash -# -# vserver-new - Create a new virtual server -# Copyright (C) 2005 Benedikt Boehm <hollow@gentoo.org> -# Christian Heim <phreak@gentoo.org> -# -# 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 - -: ${APP:=${0##*/}} -: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} - -if [ ! -e ${UTIL_VSERVER_VARS} ]; then - echo "Cannot find util-vserver installation" - echo "(the file '$UTIL_VSERVER_VARS' would be expected)" - exit 1 -fi - -source ${UTIL_VSERVER_VARS} - -if [ ! -e ${_LIB_GENTOO_FUNCTIONS} ]; then - echo "${_LIB_GENTOO_FUNCTIONS} missing. Are you running Gentoo?" - exit 1 -fi - -source ${_LIB_GENTOO_FUNCTIONS} - -trap "exit 1" INT - - - -#------------------------------------------------------------------------------# -# Constants # -#------------------------------------------------------------------------------# - -TARGETS="stage3 clone template" -VDIR=$(readlink /etc/vservers/.defaults/vdirbase) - - - -#------------------------------------------------------------------------------# -# Generic target helpers # -#------------------------------------------------------------------------------# - -generic_build() { - local interfaceopts= - - for interface in ${dst_ifaces}; do - interfaceopts="${interfaceopts} --interface ${interface}" - done - - if [ $dst_vdir_mount -eq 0 ]; then - ebegin "Automagically unmounting ${dst_vdir}" - umount ${dst_vdir} - eend $? || exit 2 - rm -rf ${dst_vdir} || die "failed to remove ${dst_vdir}" - fi - - ebegin "Building skeleton configuration" - vserver ${dst} build -m skeleton \ - --context ${dst_xid} \ - --hostname ${dst_hostname:-${dst}} \ - ${interfaceopts} \ - --initstyle plain - eend $? || ${target}_clean "failed to build skeleton" - - rm -rf ${dst_vdir}/* - - if [ $dst_vdir_mount -eq 0 ]; then - ebegin "Automagically mounting ${dst_vdir}" - mount ${dst_vdir} - eend $? || exit 2 - fi - - pushd $dst_vdir &>/dev/null || die "cd ${dst_vdir} failed" - -} - -generic_clean() { - popd &>/dev/null - - if [ -n "$1" ]; then - echo - eerror $1 - einfo "Please remember to remove these directories if appropriate:" - einfo " /etc/vservers/${dst}" - einfo " /vservers/${dst}" - - exit 1 - else - local clean="/var/tmp /tmp /var/lib/init.d" - - for dir in ${clean}; do - ebegin "Cleaning ${dir}" - rm -rf ${dst_vdir}${dir}/* - eend $? - done - fi - - echo - ewarn - ewarn "Please remember to change required settings inside your vserver" - ewarn "(hostname, hosts, ip, etc)" - ewarn -} - -generic_boot() { - if [ ${dst_start} -eq 1 ]; then - ebegin "Starting new vserver ${dst}" - vserver ${dst} start - eend $? || exit 2 - fi -} - - - -#------------------------------------------------------------------------------# -# Target: stage3 # -#------------------------------------------------------------------------------# - -stage3_usage() { - echo "Usage: vserver-new <name> <globalopts> stage3 <tar> <arch>" - echo - echo " <tar> Location of the stage3 tarball" - echo " <arch> Stage architecture" - echo -} - -stage3_init() { - if [ "$1" == "--help" ]; then - stage3_usage - exit 0 - fi - - [ -z "$1" ] && die "Missing required argument <tar>" - - # determine PORTDIR/DISTDIR/PKGDIR here, so the PROFILE check gets it - portdir=$(portageq portdir) - distdir=$(portageq distdir) - pkgdir=$(portageq pkgdir) - - [ -z "${portdir}" ] && die "host has no portdir!" - [ -z "${distdir}" ] && die "host has no distdir!" - [ -z "${pkgdir}" ] && die "host has no pkgdir!" - - tarball=$1 - [ "${tarball#/}" == "${tarball}" ] && tarball="$(pwd)/${tarball}" - - [ ! -r ${tarball} ] && die "${tarball} is not readable" - - # check arch and profile - [ -z "$2" ] && die "Missing required argument <arch>" - - profile="default-linux/$2/vserver" - [ ! -d "${portdir}/profiles/${profile}" ] && die "no profile exists for arch $2" - - stage3_build -} - -stage3_build() { - generic_build - - ebegin "Unpacking ${tarball}" - unpack ${tarball} - eend $? || stage3_clean "failed to unpack stage3 tarball" - - mkdir -p usr/portage/{distfiles,packages} || stage3_clean "failed to create portdir" - - ebegin "Using shared portage tree ${portdir}" - mount -o bind ${portdir} usr/portage || stage3_clean "failed to mount portdir" - - if [ "${distdir}" != "${portdir}/distfiles" ]; then - mount -o bind ${distdir} usr/portage/distfiles || stage3_clean "failed to mount distdir" - fi - - if [ "${pkgdir}" != "${portdir}/packages" ]; then - mount -o bind ${pkgdir} usr/portage/packages || stage3_clean "failed to mount pkgdir" - fi - eend 0 - - cp -L /etc/resolv.conf etc/resolv.conf || stage3_clean "failed to copy DNS information" - - mount -t proc none proc/ || stage3_clean "failed to mount procfs" - mount --bind /dev dev/ || stage3_clean "failed to mount dev" - - cat <<EOF > tmp/vserver-new-stage3.sh -#!/bin/bash -if [ -r /sbin/functions.sh ]; then - source /sbin/functions.sh -else - echo "/sbin/functions.sh missing. Are you running Gentoo?" -fi - -die() { - eerror \${1:-<no error message>} - einfo "Type \${APP} --help for details" - exit \${2:-1} -} - -env-update || die "failed to update environment" -source /etc/profile || die "failed to source /etc/profile" - -pushd /etc &>/dev/null || die "failed to cd /etc" -rm make.profile - -ebegin "Switching to vserver portage profile" -ln -s ../usr/portage/profiles/${profile} make.profile -eend \$? || exit 1 - -echo - -emerge -k syslog-ng - -echo - -pushd syslog-ng &>/dev/null || die "failed to cd /etc/syslog-ng" -sed -i -e 's:pipe("/proc/kmsg"); ::' syslog-ng.conf -sed -i -r 's:(.*console_all.*):#\1:g' syslog-ng.conf - -rc-update add syslog-ng default - -popd &>/dev/null -popd &>/dev/null -EOF - - chmod +x tmp/vserver-new-stage3.sh - - echo - einfo "We're chrooting into the unpacked stage3 now!" - ewarn "It is not advisable to hit Ctrl+C during this step!" - ewarn "You have been warned! Continuing in 10 seconds ..." - echo - sleep 10 - - chroot . /tmp/vserver-new-stage3.sh || stage3_clean "chroot script failed, see above" - - stage3_clean -} - -stage3_clean() { - rm tmp/vserver-new-stage3.sh || ewarn "failed to remove chroot script" - - if [ "${distdir}" != "${portdir}/distfiles" ]; then - umount usr/portage/distfiles || ewarn "failed to umount distdir" - fi - - if [ "${pkgdir}" != "${portdir}/packages" ]; then - umount usr/portage/packages || ewarn "failed to umount pkgdir" - fi - - umount usr/portage || ewarn "failed to umount portdir" - umount proc/ || ewarn "failed to umount proc/" - umount dev/ || ewarn "failed to umount dev/" - - generic_clean $1 - stage3_boot -} - -stage3_boot() { - generic_boot -} - -#------------------------------------------------------------------------------# -# Target: clone # -#------------------------------------------------------------------------------# - -clone_usage() { - echo "Usage: vserver-new <name> <globalopts> clone <src>" - echo - echo " <src> Name of the vserver to copy from" - echo -} - -clone_init() { - if [ "$1" == "--help" ]; then - clone_usage - exit 0 - fi - - [ -z "$1" ] && die "Missing required argument <src>" - - src=$1 - src_vdir="${VDIR}/${src}" - - [ ! -d $src_vdir ] && die "<src> does not exist" - - stopped=0 - if vs_is_running_name ${src} true; then - ebegin "Stopping source vserver" - vserver ${src} stop - eend $? || die "failed to stop vserver ${src}" - stopped=1 - fi - - clone_build -} - -clone_build() { - generic_build - - ebegin "Running rsync -a $src_vdir/ $dst_vdir" - rsync -a $src_vdir/ $dst_vdir - eend $? || clone_clean "failed to copy ${src} to ${dst}" - - clone_clean -} - -clone_clean() { - generic_clean $1 - clone_boot -} - -clone_boot() { - if [ ${stopped} -eq 1 ]; then - ebegin "Starting source vserver" - vserver ${src} start - eend $? || ewarn "failed to start vserver ${src}" - fi - - generic_boot -} - - -#------------------------------------------------------------------------------# -# Target: template # -#------------------------------------------------------------------------------# - -template_usage() { - echo "Usage: vserver-new <name> <globalopts> template <tar>" - echo - echo " <tar> Path to the template tarball" - echo - echo "To build a template, go to your exisiting vserver" - echo "installation and tar the whole rootfs:" - echo - echo "$ cd /vservers/foo" - echo "$ tar cvpf ../foo-template.tar ./" -} - -template_init() { - if [ "$1" == "--help" ]; then - template_usage - exit 0 - fi - - [ -z "$1" ] && die "Missing required argument <tar>" - - tarball=$1 - [ "${tarball#/}" == "${tarball}" ] && tarball="$(pwd)/${tarball}" - [ ! -r ${tarball} ] && die "${tarball} is not readable" - - template_build -} - -template_build() { - generic_build - - ebegin "Unpacking $(basename ${tarball}) to ${dst_vdir}" - unpack ${tarball} - eend $? || template_clean "failed to unpack template" - - template_clean -} - -template_clean() { - generic_clean $1 - template_boot -} - -template_boot() { - generic_boot -} - - -#------------------------------------------------------------------------------# -# Main app # -#------------------------------------------------------------------------------# -usage() { - echo "Usage: vserver-new <name> <globalopts> <target> [localopts]" - echo - echo " <name> Name of the new vserver" - echo " <globalopts> See Global options below" - echo " <target> See Supported targets below" - echo " [localopts] Target specific options" - echo - echo "Global options:" - echo " --context <id> Static context ID of <name> (required)" - echo " --hostname <name> Hostname of <name>" - echo " --interface [<name-suffix>=][<device>:]<ip>[/<mask|prefixlen>]" - echo " Declare a new network-interface for <name> (this" - echo " option can be specified multiple times)" - echo " --start Start the new vserver" - echo " --destroy Destroy exisiting vserver installation" - echo " (Use this option if you have seperate" - echo " fs mounts for each vserver)" - echo - echo "Supported targets:" - echo " stage3 Build a new vserver using a stage3 tarball" - echo " clone Clone an already exisiting vserver" - echo " template Create a new vserver using a template tarball" - echo - echo "Type vserver-new <target> --help for local options" -} - -# 1. Check for "vserver-new <target> --help" construct -if [ "$2" == "--help" ]; then - for i in $TARGETS; do - if [ "$i" == "$1" ]; then - ${i}_usage - exit 0 - fi - done - - die "Selected target not supported" -fi - -# 2. Check for "vserver-new --help" construct -if [ "$1" == "--help" ]; then - usage - exit 0 -fi - -# 3. Checking <name> -[ -z "$1" ] && die "Missing argument <name>" - -# 4. Parsing opts -dst=$1 && shift -opts=$(POSIXLY_CORRECT=1 getopt -o h --longoptions help,context:,hostname:,interface:,start,destroy -n $0 -- "$@") - -[ "$?" != "0" ] && die "Wrong number of options" - -eval set -- "$opts" - -dst_vdir="${VDIR}/${dst}" -dst_xid= -dst_hostname= -dst_ifaces= -dst_start=0 -destroy=0 -dst_vdir_mount=1 - -while true; do - case "$1" in - -h|--help) - usage - exit 0 - ;; - --context) - dst_xid=$2 - shift 2 - ;; - --hostname) - dst_hostname=$2 - shift 2 - ;; - --interface) - dst_ifaces="${dst_ifaces} $2" - shift 2 - ;; - --start) - dst_start=1 - shift - ;; - --destroy) - destroy=1 - shift - ;; - --) - shift - break - ;; - *) - die "Unknown argument '${1}'" - ;; - esac -done - -# 5. Checking environment -if [ -d $dst_vdir ]; then - grep ${dst_vdir} /etc/fstab &>/dev/null - dst_vdir_mount=$? - - if [ ${destroy} -eq 1 ]; then - ewarn "Existing vserver installation will be destroyed!" - ewarn "Proceeding in 10 seconds ..." - sleep 10 - - einfo "Removing existing installation ..." - - if [ ${dst_vdir_mount} -eq 0 ]; then - ebegin " ${dst_vdir}/*" - rm -rf ${dst_vdir}/* - eend $? || exit 1 - else - ebegin " ${dst_vdir}" - rm -rf ${dst_vdir} - eend $? || exit 1 - fi - - ebegin " /etc/vservers/${dst}" - rm -rf /etc/vservers/${dst} - eend $? - else - eerror "Existing vserver installation found. Try --destroy" - exit 1 - fi -fi - -[ -d /etc/vservers/${dst} ] && die "vserver config dir already exists" - -# 6. Checking required option --context -[ -z "$dst_xid" ] && die "Missing required global option --context" - -# 7. Checking <target> -[ -z "$1" ] && die "Missing argument <target>" - -target= -for i in $TARGETS; do - [ "$i" == "$1" ] && target=$i -done -shift - -[ -z "$target" ] && die "Selected target not supported" - -# 8. Start target -trap "${target}_clean 'Caught interrupt'" INT -${target}_init "$@" diff --git a/util-vserver/tools/vupdateworld b/util-vserver/tools/vupdateworld deleted file mode 100755 index e13b5c1..0000000 --- a/util-vserver/tools/vupdateworld +++ /dev/null @@ -1,164 +0,0 @@ -#!/bin/bash -# -# vupdateworld - Update world in vservers -# Copyright (C) 2005 Benedikt Boehm <hollow@gentoo.org> -# Christian Heim <phreak@gentoo.org> -# -# 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 - -: ${APP:=${0##*/}} -: ${UTIL_VSERVER_VARS:=/usr/lib/util-vserver/util-vserver-vars} - -if [ ! -e ${UTIL_VSERVER_VARS} ]; then - echo "Cannot find util-vserver installation" - echo "(the file '$UTIL_VSERVER_VARS' would be expected)" - exit 1 -fi - -source ${UTIL_VSERVER_VARS} - -if [ ! -e ${_LIB_GENTOO_FUNCTIONS} ]; then - echo "${_LIB_GENTOO_FUNCTIONS} missing. Are you running Gentoo?" - exit 1 -fi - -source ${_LIB_GENTOO_FUNCTIONS} - -trap "exit 1" INT - -updateworld() { -# $1 - name of the vserver - if [ ${pretend} -eq 0 ]; then - ebegin "Running 'emerge world' for vserver '${1}'" - /usr/sbin/vserver ${1} exec /usr/bin/emerge world -Du${usepkg} --newuse --nospinner >&9 - eend $? || die - else - einfo "Pretending 'emerge world' for vserver '${1}'" - /usr/sbin/vserver ${1} exec /usr/bin/emerge world -Dupq${usepkg} --newuse --nospinner | egrep '^\[(ebuild|binary)' >&9 - echo - fi - -} - -usage() { - echo "Usage: vupdateworld <opts> [<name>]" - echo - echo "<name> Name of the vserver (required if --all not used)" - echo "<emergeopts> Additional arguments passed to the emerge command" - echo - echo "Options:" - echo " -h, --help This help message" - echo " -V, --version Show the version" - echo " -q, --quiet Don't show output of emerge" - echo " -a, --all Sync all running vservers" - echo " -e, --exclude <list> Exclude single vservers with --all" - echo " -p, --pretend Display what *would* have been installed" - echo " -k, --usepkg Use binary packages" - echo -} - -# Parsing opts -opts=$(POSIXLY_CORRECT=1 getopt -o hVqae:pk --longoptions help,version,quiet,all,exclude:,pretend,usepkg -n $0 -- "$@") - -[ "$?" != "0" ] && die "Wrong number of options" - -eval set -- "$opts" - -quiet=0 -all=0 -exclude= -pretend=0 -usepkg= - -while true; do - case "${1}" in - --help|-h) - usage - exit 0 - ;; - --version|-V) - echo "${APPNAME} version ${VERSION}" - exit 0 - ;; - --quiet|-q) - quiet=1 - shift - ;; - --all|-a) - all=1 - shift - ;; - --exclude|-e) - exclude=$2 - shift 2 - ;; - --pretend|-p) - pretend=1 - shift - ;; - --usepkg|-k) - usepkg="k" - shift - ;; - --) - shift - break - ;; - *) - die "Unknown argument '${1}'" - ;; - esac -done - -# checking quiet option -if [ ${quiet} -eq 0 ]; then - exec 9>&1 -else - exec 9>/dev/null 2>&1 -fi - -# checking vserver name -name= -if [ -z "$1" ] && [ ${all} -eq 0 ]; then - die "Missing argument <name>" -else - name=$1 -fi -shift - -# get list of all running vservers -if [ ${all} -eq 0 ]; then - vservers=${name} -else - running=$(vs_running_name) - vservers= - - for r in ${running}; do - match=0 - - for e in ${exclude}; do - [ "${r}" == "${e}" ] && match=1 - done - - [ ! -f "${__CONFDIR}/${r}/vdir/etc/gentoo-release" ] && match=1 - - [ ${match} -eq 0 ] && vservers="${vservers} ${r}" - done -fi - -# finally, sync it! -for vserver in ${vservers}; do - updateworld ${vserver} -done |