summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heim <phreak@gentoo.org>2006-11-05 10:04:51 +0000
committerChristian Heim <phreak@gentoo.org>2006-11-05 10:04:51 +0000
commit53935dae435931f698ab04e541d457384527f2e3 (patch)
tree6b298c7eb53a07b3b84b0e5ff5e0948a0f4b2c70
parentPatchset for 2.1.1-rc47. (diff)
downloadmisc-53935dae435931f698ab04e541d457384527f2e3.tar.gz
misc-53935dae435931f698ab04e541d457384527f2e3.tar.bz2
misc-53935dae435931f698ab04e541d457384527f2e3.zip
Updating the patches a bit, adding further changes from UPSTREAM.
svn path=/; revision=518
-rw-r--r--util-vserver/patches/0.30.211-r1/005_all_baselayout-1.13.patch144
-rw-r--r--util-vserver/patches/0.30.211-r1/010_all_vyumworker-fixes.patch25
2 files changed, 114 insertions, 55 deletions
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
index 0be605a..de318f7 100644
--- 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
@@ -1,15 +1,18 @@
Index: scripts/vserver.functions
===================================================================
---- scripts/vserver.functions (revision 2359)
-+++ scripts/vserver.functions (revision 2360)
-@@ -299,8 +299,25 @@
+--- 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";;
-+ INITCMD_START=( /lib/rcscripts/sh/init-vserver.sh )
-+ INITCMD_STOP=( /sbin/rc shutdown )
++ 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
@@ -29,10 +32,73 @@ Index: scripts/vserver.functions
(x) ;;
(*) panic "Unknown init-style '$INITSTYLE'; aborting";;
esac
+@@ -805,7 +825,7 @@
+ _mountVserverInternal "$cfgdir"/fstab.remote $_CHBIND "${CHBIND_OPTS[@]}"
+
+ isNamespaceCleanup "$cfgdir" && \
+- _namespaceCleanup
++ _namespaceCleanup "$cfgdir"
+
+ isAvoidNamespace "$cfgdir" || \
+ $_SECURE_MOUNT --rbind -n "$vdir" "/"
+@@ -1161,26 +1181,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: distrib/Makefile.am
===================================================================
---- distrib/Makefile.am (revision 2359)
-+++ distrib/Makefile.am (revision 2360)
+--- distrib/Makefile.am (revision 2354)
++++ distrib/Makefile.am (revision 2370)
@@ -31,7 +31,9 @@
nobase_distrib_SCRIPTS = redhat/initpost \
redhat/initpre \
@@ -47,7 +113,7 @@ Index: distrib/Makefile.am
Index: distrib/gentoo/init-vserver.sh
===================================================================
--- distrib/gentoo/init-vserver.sh (revision 0)
-+++ distrib/gentoo/init-vserver.sh (revision 2360)
++++ distrib/gentoo/init-vserver.sh (revision 2370)
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
@@ -77,11 +143,11 @@ Index: distrib/gentoo/init-vserver.sh
+
+RUNLEVEL=1 /sbin/rc sysinit
+/sbin/rc boot
-+/sbin/rc default
++/sbin/rc ${1:-default}
Index: distrib/gentoo/initpost
===================================================================
---- distrib/gentoo/initpost (revision 2359)
-+++ distrib/gentoo/initpost (revision 2360)
+--- distrib/gentoo/initpost (revision 2354)
++++ distrib/gentoo/initpost (revision 2370)
@@ -1,6 +1,6 @@
-#! /bin/bash
+#!/bin/bash
@@ -111,6 +177,32 @@ Index: distrib/gentoo/initpost
-/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}')
@@ -157,38 +249,12 @@ Index: distrib/gentoo/initpost
+# fix fstab for checkfs/localmount
+pushd "$vdir" &>/dev/null
+echo ">>> Fixing fstab ... "
-+echo "/dev/hdv1 / ufs 0 0" | $_CHROOT_SH truncate /etc/fstab
++echo "/dev/hdv1 / ufs defaults 0 0" | $_CHROOT_SH truncate /etc/fstab
+popd &>/dev/null
-+
-+
-+# 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
Index: distrib/gentoo/initpre
===================================================================
--- distrib/gentoo/initpre (revision 0)
-+++ distrib/gentoo/initpre (revision 2360)
++++ distrib/gentoo/initpre (revision 2370)
@@ -0,0 +1,48 @@
+#!/bin/bash
+
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
index 23c0824..4900a51 100644
--- 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
@@ -1,21 +1,8 @@
Index: scripts/vyum-worker
===================================================================
---- scripts/vyum-worker (revision 2360)
-+++ scripts/vyum-worker (revision 2361)
-@@ -64,7 +64,7 @@
- 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
-Index: scripts/vyum-worker
-===================================================================
---- scripts/vyum-worker (revision 2355)
-+++ scripts/vyum-worker (revision 2356)
-@@ -60,7 +60,7 @@
+--- 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"))'
;;
@@ -24,3 +11,9 @@ Index: scripts/vyum-worker
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
+