Date: Thu, 8 Jun 2000 04:43:19 -0400 (EDT) From: Trevor Johnson <trevor@jpj.net> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/19119: un-forbid x11/XFree86-4 and unbreak its xterm Message-ID: <Pine.BSI.4.05L.10006071345051.17674-100000@blues.jpj.net>
next in thread | raw e-mail | index | archive | help
>Number: 19119 >Category: ports >Synopsis: un-forbid x11/XFree86-4 and unbreak its xterm >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jun 08 01:50:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Trevor Johnson >Release: 4.0-STABLE i386 >Organization: just myself >Environment: only tested on FreeBSD 4.0-STABLE #0: Fri May 26 19:12:56 BST 2000 i386 >Description: The port is forbidden because of a security problem, for which I've made a patch. Also, the xterm shipped with it has an annoying bug, which Thomas Dickey, the maintainer of the program, has corrected: XFree86 4.0 should have incorporated my patch 131, but it was overlooked at the last moment. Unfortunately, the patch 130 version which was released renders colors incorrectly on most platforms, in particular FreeBSD. Ironically, the change in patch 129 which introduced this bug was designed to work around a bug which I have seen only running with FreeBSD. To compound the irony, there is some resistance at this time (2000/4/5) by that organization to incorporating the fix because it might be confused with the 4.0 release version. says http://dickey.his.com/xterm/xterm.faq.html . On 23 May I e-mailed my patch to the maintainer and the person who forbade the port (my message is archived at http://www.geocrawler.com/archives/3/167/2000/5/0/3781546/). So far, I haven't received any response. A port of xterm 132 was submitted by Christian Weisgerber as ports/15545. I'm in favor of something along those lines (preferably under ${X11BASE} rather than ${LOCALBASE}). However, the change in patches/patch-j is enough to make xterm usable for me. If the PATCH_SITES and PATCHFILES lines are uncommented and patch-j removed, the most recent xterm can be retrieved. That patch is 51 kilobytes. >How-To-Repeat: Remove the FORBIDDEN line from the port's Makefile and install the port. For the first bug, become root (if you want the X server to dump core) and do: XFree86 -core -xkbmap `perl -e 'print "a"x2048'` Try the same with other characters. Examine the core files. For the second, run csh and do: set prompt="%{\e[32;43m%}%~%{\e[37;40m%} " or run a program which normally displays colored text. Note the wrong colors. >Fix: diff -ruN XFree86-4.orig/Makefile XFree86-4/Makefile --- XFree86-4.orig/Makefile Sun Apr 30 09:21:56 2000 +++ XFree86-4/Makefile Wed Jun 7 20:42:06 2000 @@ -15,9 +15,11 @@ ftp://sunsite.doc.ic.ac.uk/packages/XFree86/4.0/source/ DISTFILES= X400src-1.tgz X400src-2.tgz -MAINTAINER= jmz@FreeBSD.org +# for a more recent xterm (remove patches/patch-j) +#PATCH_SITES= http://jpj.net/~trevor/freebsd/ports/ +#PATCHFILES= xterm-136.diff.gz -FORBIDDEN= "Root hole in X server, XFree86 developers seem to be ignoring us" +MAINTAINER= jmz@FreeBSD.org WRKSRC= ${WRKDIR}/${DIST_SUBDIR} .if (${MACHINE} != "alpha") diff -ruN XFree86-4.orig/files/md5 XFree86-4/files/md5 --- XFree86-4.orig/files/md5 Sat Mar 11 00:20:18 2000 +++ XFree86-4/files/md5 Wed Jun 7 16:38:44 2000 @@ -1,3 +1,4 @@ MD5 (xc/X400src-1.tgz) = a93f407ee0dd7ed806a97370c2ae637d MD5 (xc/X400src-2.tgz) = ad5f7461adb6b2646f9a9c48ad93f6da MD5 (xc/Wraphelp.c) = IGNORE +MD5 (xc/xterm-136.diff.gz) = a6247b79d1fa6afdddc7efa7f6376778 diff -ruN XFree86-4.orig/patches/patch-i XFree86-4/patches/patch-i --- XFree86-4.orig/patches/patch-i Thu Jan 1 01:00:00 1970 +++ XFree86-4/patches/patch-i Tue May 23 16:55:17 2000 @@ -0,0 +1,12 @@ +--- programs/Xserver/xkb/xkbInit.c.orig Mon Oct 5 05:02:55 1998 ++++ programs/Xserver/xkb/xkbInit.c Tue May 23 16:52:19 2000 +@@ -910,7 +910,8 @@ + return 1; + } + else if (strncmp(argv[i], "-xkbmap", 7) == 0) { +- if(++i < argc) { ++ i++; ++ if ((i < argc) && (strlen(argv[i]) < PATH_MAX)) { + XkbInitialMap= argv[i]; + return 2; + } diff -ruN XFree86-4.orig/patches/patch-j XFree86-4/patches/patch-j --- XFree86-4.orig/patches/patch-j Thu Jan 1 01:00:00 1970 +++ XFree86-4/patches/patch-j Wed Jun 7 20:40:11 2000 @@ -0,0 +1,11 @@ +diff -ru programs/xterm/charproc.c.orig programs/xterm/charproc.c +--- programs/xterm/charproc.c.orig Wed Mar 1 01:21:00 2000 ++++ programs/xterm/charproc.c Fri Mar 3 03:53:46 2000 +@@ -4307,6 +4310,7 @@ + wnew->screen.Acolors[i] = request->screen.Acolors[i]; + #if OPT_COLOR_RES + TRACE(("Acolors[%d] = %s\n", i, request->screen.Acolors[i].resource)); ++ wnew->screen.Acolors[i].mode = False; + if (strcmp(wnew->screen.Acolors[i].resource, XtDefaultForeground)) + color_ok = True; + #else >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.4.05L.10006071345051.17674-100000>