diff options
Diffstat (limited to 'sys/cluster/util-vserver')
-rw-r--r-- | sys/cluster/util-vserver/util-vserver-0.30.212.diff | 44 | ||||
-rwxr-xr-x | sys/cluster/util-vserver/util-vserver.SlackBuild | 25 |
2 files changed, 58 insertions, 11 deletions
diff --git a/sys/cluster/util-vserver/util-vserver-0.30.212.diff b/sys/cluster/util-vserver/util-vserver-0.30.212.diff new file mode 100644 index 00000000..8e5204c7 --- /dev/null +++ b/sys/cluster/util-vserver/util-vserver-0.30.212.diff @@ -0,0 +1,44 @@ +Index: /src/vlogin.c +=================================================================== +--- /src/vlogin.c (revision 2325) ++++ /src/vlogin.c (revision 2514) +@@ -125,5 +125,5 @@ + + /* copy terminal activities */ +-static void ++static ssize_t + terminal_copy(int src, int dst) + { +@@ -142,4 +142,6 @@ + /* write activity to user */ + EwriteAll(dst, buf, len); ++ ++ return len; + } + +@@ -277,9 +279,19 @@ + } + +- if (FD_ISSET(STDIN_FILENO, &rfds)) +- terminal_copy(STDIN_FILENO, t.fd); +- +- if (FD_ISSET(t.fd, &rfds)) +- terminal_copy(t.fd, STDOUT_FILENO); ++ if (FD_ISSET(STDIN_FILENO, &rfds)) { ++ /* EOF */ ++ if (terminal_copy(STDIN_FILENO, t.fd) == 0) { ++ terminal_kill(SIGHUP); ++ exit(0); ++ } ++ } ++ ++ if (FD_ISSET(t.fd, &rfds)) { ++ /* EOF */ ++ if (terminal_copy(t.fd, STDOUT_FILENO) == 0) { ++ terminal_kill(SIGHUP); ++ exit(0); ++ } ++ } + } + + diff --git a/sys/cluster/util-vserver/util-vserver.SlackBuild b/sys/cluster/util-vserver/util-vserver.SlackBuild index 9303c7d4..cebb683d 100755 --- a/sys/cluster/util-vserver/util-vserver.SlackBuild +++ b/sys/cluster/util-vserver/util-vserver.SlackBuild @@ -27,7 +27,7 @@ fi PACKAGE="util-vserver" ARCH=${ARCH:=i486} VERSION=${VERSION:=0.30.212} -BUILD=${BUILD:=1rha} +BUILD=${BUILD:=2rha} SRC_DIR=${SRC:=$CWD} TMP=${TMP:=/tmp} REPOS=${REPOS:=$TMP} @@ -50,18 +50,16 @@ SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" URL="http://ftp.linux-vserver.org/pub/utils/util-vserver/$SRC" -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" -fi - SRC_DIR="$SRC_DIR/$PACKAGE" mkdir -p $SRC_DIR -if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then - wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET - wget "$URL.asc" -O "$SRC_DIR/$SRC.asc" || exit $ERROR_WGET +if [ "$RTOOL" == "wget" ]; then + if [ ! -f "$SRC_DIR/$SRC" ]; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET + fi + if [ ! -f "$SRC_DIR/$SRC.asc" ]; then + wget "$URL.asc" -O "$SRC_DIR/$SRC.asc" || exit $ERROR_WGET + fi fi # gpg --verify $SRC_DIR/$SRC.asc $SRC_DIR/$SRC || exit $ERROR_GPG @@ -71,8 +69,13 @@ rm -rf $TMP mkdir -p $TMP/package-$PACKAGE cd $TMP -tar xvf$tarflag $SRC_DIR/$SRC || exit $ERROR_TAR +tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR cd $PACKAGE-$VERSION + +if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then + patch -p1 < $CWD/$PACKAGE-$VERSION.diff +fi + ./configure --prefix=/usr --sysconfdir=/etc --libdir=$LIBDIR --with-initrddir=/etc/rc.d --localstatedir=/var || exit $ERROR_CONF make || exit $ERROR_MAKE make DESTDIR=$TMP/package-$PACKAGE install || exit $ERROR_INSTALL |