summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2008-03-08 13:59:39 +0000
committerbouyer <bouyer@pkgsrc.org>2008-03-08 13:59:39 +0000
commit2cfeee172d79d8b841ed0270c6f5218306803479 (patch)
tree81c49fea41c37e3f803038fa0b7826b50e7ea053 /sysutils
parent6b0729e1160957552e48781a798a0a6356fbe9c6 (diff)
downloadpkgsrc-2cfeee172d79d8b841ed0270c6f5218306803479.tar.gz
On NetBSD, the pseudo-tty attributes are reset when the slave is open
for the first time. This cause a race between xenconsole and xenconsoled, where the later start writing to the master pty before the former has switched it back to raw, causing some lines to be echoed back to the domU. Fix this by keeping the slave open in xenconsoled, so that when xenconsole opens it attributes are not reset. Hint provided by fvdl@, thanks ! Because of this we no longer need to set the slave to raw in xenconsole, so shorten patch-cc. Bump PKGREVISION.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xentools3/Makefile4
-rw-r--r--sysutils/xentools3/distinfo5
-rw-r--r--sysutils/xentools3/patches/patch-ca57
-rw-r--r--sysutils/xentools3/patches/patch-cc10
4 files changed, 63 insertions, 13 deletions
diff --git a/sysutils/xentools3/Makefile b/sysutils/xentools3/Makefile
index 08ebeae1d1e..cda4784ee27 100644
--- a/sysutils/xentools3/Makefile
+++ b/sysutils/xentools3/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.9 2008/03/03 17:11:19 xtraeme Exp $
+# $NetBSD: Makefile,v 1.10 2008/03/08 13:59:39 bouyer Exp $
#
VERSION= 3.1.3
DISTNAME= xen-${VERSION}-src
PKGNAME= xentools3-${VERSION}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_LOCAL}
EXTRACT_SUFX= .tgz
diff --git a/sysutils/xentools3/distinfo b/sysutils/xentools3/distinfo
index 6fa27072851..44594364581 100644
--- a/sysutils/xentools3/distinfo
+++ b/sysutils/xentools3/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2008/03/03 16:45:27 hannken Exp $
+$NetBSD: distinfo,v 1.7 2008/03/08 13:59:39 bouyer Exp $
SHA1 (xen-3.1.3-src.tgz) = 87b370df928feda599bbc7076e7a4589f67355c8
RMD160 (xen-3.1.3-src.tgz) = b26b71e0422db7aece60aa4dd9f9c8d34affd0c7
@@ -25,8 +25,9 @@ SHA1 (patch-br) = 906ac9598808f7e9677a04bbe159d174ea6f8b9a
SHA1 (patch-bs) = e6542ccdad7b48536d2d1b0ad533da4b1a784022
SHA1 (patch-bt) = d1cfab2ccf14d3df0fdda4c4699258997d2eb5d2
SHA1 (patch-bw) = d4bdb0dcc48cabefb568042d3b58822f8251b1bd
+SHA1 (patch-ca) = f999e8159c79ae6cd09004b8cac4ca36da93f79f
SHA1 (patch-cb) = 0bf2513749e28ff955caabd76bf79dd8280b61ed
-SHA1 (patch-cc) = 3e618c7da953115e7b3c7fe07f17b75ef2c2bb34
+SHA1 (patch-cc) = ffd67fd2c6ab21abd5afdbca893e35bb4bb3fa77
SHA1 (patch-cd) = 8fc057e9dc98e356ba46cdf183a8891c59c005b8
SHA1 (patch-cf) = 05c5e86d33d31a2216c2751a2bf684c8d5d06746
SHA1 (patch-cg) = 36073c7327f187702203108b3e7596178aac3327
diff --git a/sysutils/xentools3/patches/patch-ca b/sysutils/xentools3/patches/patch-ca
new file mode 100644
index 00000000000..002ce9c8078
--- /dev/null
+++ b/sysutils/xentools3/patches/patch-ca
@@ -0,0 +1,57 @@
+$NetBSD: patch-ca,v 1.1 2008/03/08 13:59:39 bouyer Exp $
+
+--- console/daemon/io.c.orig 2008-03-08 14:24:52.000000000 +0100
++++ console/daemon/io.c 2008-03-08 14:41:23.000000000 +0100
+@@ -56,6 +56,7 @@
+ {
+ int domid;
+ int tty_fd;
++ int stty_fd;
+ bool is_dead;
+ struct buffer buffer;
+ struct domain *next;
+@@ -160,6 +161,12 @@
+ char *data;
+ unsigned int len;
+
++ if ((dom->stty_fd = open(slave, O_RDONLY, 0)) == -1) {
++ dolog(LOG_ERR, "Failed to open slave tty %s for "
++ "domain-%d", slave, dom->domid);
++ goto out;
++ }
++
+ if (tcgetattr(master, &term) != -1) {
+ cfmakeraw(&term);
+ tcsetattr(master, TCSAFLUSH, &term);
+@@ -444,6 +451,7 @@
+ {
+ if (d->tty_fd != -1) {
+ close(d->tty_fd);
++ close(d->stty_fd);
+ d->tty_fd = -1;
+ }
+
+@@ -527,6 +535,7 @@
+ len = read(dom->tty_fd, msg, len);
+ if (len < 1) {
+ close(dom->tty_fd);
++ close(dom->stty_fd);
+ dom->tty_fd = -1;
+
+ if (domain_is_valid(dom->domid)) {
+@@ -545,6 +554,7 @@
+ xc_evtchn_notify(dom->xce_handle, dom->local_port);
+ } else {
+ close(dom->tty_fd);
++ close(dom->stty_fd);
+ dom->tty_fd = -1;
+ shutdown_domain(dom);
+ }
+@@ -564,6 +574,7 @@
+ dom->domid, len, errno);
+
+ close(dom->tty_fd);
++ close(dom->stty_fd);
+ dom->tty_fd = -1;
+
+ if (domain_is_valid(dom->domid)) {
diff --git a/sysutils/xentools3/patches/patch-cc b/sysutils/xentools3/patches/patch-cc
index 5032dca341d..6f686724413 100644
--- a/sysutils/xentools3/patches/patch-cc
+++ b/sysutils/xentools3/patches/patch-cc
@@ -1,4 +1,4 @@
-$NetBSD: patch-cc,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
+$NetBSD: patch-cc,v 1.2 2008/03/08 13:59:39 bouyer Exp $
--- console/client/main.c.orig 2007-05-18 16:45:21.000000000 +0200
+++ console/client/main.c 2007-05-27 14:43:14.000000000 +0200
@@ -14,11 +14,3 @@ $NetBSD: patch-cc,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
#include "xs.h"
-@@ -289,6 +293,7 @@
- err(errno, "Could not read tty from store");
- }
-
-+ init_term(spty, &attr);
- init_term(STDIN_FILENO, &attr);
- console_loop(spty, xs, path);
- restore_term(STDIN_FILENO, &attr);