From nobody@FreeBSD.org  Wed Dec 15 04:22:27 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F33E9106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Dec 2010 04:22:27 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id E18F38FC14
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Dec 2010 04:22:27 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oBF4MRoi031551
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Dec 2010 04:22:27 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oBF4MRr6031550;
	Wed, 15 Dec 2010 04:22:27 GMT
	(envelope-from nobody)
Message-Id: <201012150422.oBF4MRr6031550@red.freebsd.org>
Date: Wed, 15 Dec 2010 04:22:27 GMT
From: Frdric Perrin <frederic.perrin+freebsd@resel.fr>
To: freebsd-gnats-submit@FreeBSD.org
Subject: termcap needs an entry for rxvt-unicode-256color
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         153164
>Category:       conf
>Synopsis:       [termcap] [patch] termcap needs an entry for rxvt-unicode-256color
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ed
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 15 04:30:10 UTC 2010
>Closed-Date:    Fri Mar 11 19:44:41 UTC 2011
>Last-Modified:  Fri Mar 11 19:50:08 UTC 2011
>Originator:     Frdric Perrin
>Release:        8.1-RELEASE
>Organization:
>Environment:
root@papillon:/usr/obj/usr/src/share/termcap# uname -a
FreeBSD papillon.fperrin.net 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Hello,

rxvt-unicode version 9.09 was released last month. It added support for 256 colors in the default configuration, and the default value of $TERM changed to rxvt-unicode-256color (from rxvt-unicode).

This results in slightly incorrect colors, and some programs like vi(1) refusing to work.

After a short discussion[1] with Chip Camden, it appears that rxvt-unicode-256color needs the same definition as rxvt-256color. The attached patch (against HEAD) installs this definition.

http://thread.gmane.org/gmane.os.freebsd.questions/272566
>How-To-Repeat:
Install rxvt-unicode version 9.09. Check that $TERM is rxvt-unicode-256color, and that the terminal can indeed display 256 colors.

Log into a FreeBSD system. If the shell is zsh(1), observe that backspace only outputs a space, and that ^U doesn't erase the line. Use vi(1) to edit a file, observe that it fails with  vi: No terminal database found .
>Fix:
Apply the attached patch (again, against HEAD, not against 8.1-RELEASE) to usr/share/misc/termcap, and run cap_mkdb.

Patch attached with submission follows:

--- termcap.orig	2010-12-15 05:06:16.000000000 +0100
+++ termcap	2010-12-15 05:09:49.000000000 +0100
@@ -4587,6 +4587,9 @@
 rxvt-256color|rxvt terminal emulator with 256 colors:\
 	:Co#256:AF=\E[38;5;%dm:AB=\E[48;5;%dm:tc=rxvt-unicode:
 
+rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
+	:tc=rxvt-256color:
+
 # Termcap entry for Eterm, taken from the sources of Eterm-0.9.2
 Eterm|Eterm Terminal Emulator (X11 Window System):\
 	:am:bw:eo:km:mi:ms:xn:xo:\


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ed 
Responsible-Changed-By: ed 
Responsible-Changed-When: Sat Feb 19 08:41:45 UTC 2011 
Responsible-Changed-Why:  
I'd better take this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153164 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/153164: commit references a PR
Date: Sat, 19 Feb 2011 11:06:10 +0000 (UTC)

 Author: ed
 Date: Sat Feb 19 11:06:00 2011
 New Revision: 218844
 URL: http://svn.freebsd.org/changeset/base/218844
 
 Log:
   Improve 256 color support.
   
   - Add screen-256color,
   - Improve rxvt-256color to set pa and op properly.
   - Add rxvt-unicode-256color as an alias to rxvt-256color.
   
   PR:		conf/152713, conf/153164
   Submitted by:	Alexander Verbod and Frédéric Perrin
   MFC after:	2 weeks
 
 Modified:
   head/share/termcap/termcap.src
 
 Modified: head/share/termcap/termcap.src
 ==============================================================================
 --- head/share/termcap/termcap.src	Sat Feb 19 10:36:05 2011	(r218843)
 +++ head/share/termcap/termcap.src	Sat Feb 19 11:06:00 2011	(r218844)
 @@ -2784,6 +2784,9 @@ SH|screen-s|VT 100/ANSI X3.64 virtual te
  	:ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen:
  SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols:\
  	:co#132:tc=screen:
 +screen-256color|VT 100/ANSI X3.64 terminal with 256 colors:\
 +	:Co#256:pa#32767:\
 +	:AB=\E[48;5;%dm:AF=\E[38;5;%dm:tc=screen:
  # $XTermId: termcap,v 1.78 2009/11/09 00:24:26 tom Exp $
  #
  # Note:
 @@ -4632,7 +4635,11 @@ rxvt|rxvt terminal emulator (X Window Sy
  	:pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:tc=rxvt-mono:
  
  rxvt-256color|rxvt terminal emulator with 256 colors:\
 -	:Co#256:AF=\E[38;5;%dm:AB=\E[48;5;%dm:tc=rxvt-unicode:
 +	:Co#256:pa#32767:\
 +	:AB=\E[48;5;%dm:AF=\E[38;5;%dm:op=\E[39;49m:tc=rxvt-unicode:
 +
 +rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
 +	:tc=rxvt-256color:
  
  # Termcap entry for Eterm, taken from the sources of Eterm-0.9.2
  Eterm|Eterm Terminal Emulator (X11 Window System):\
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: ed 
State-Changed-When: Sat Feb 19 11:20:47 UTC 2011 
State-Changed-Why:  
Committed! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153164 
State-Changed-From-To: patched->closed 
State-Changed-By: ed 
State-Changed-When: Fri Mar 11 19:44:40 UTC 2011 
State-Changed-Why:  
Now part of 8.x! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153164 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/153164: commit references a PR
Date: Fri, 11 Mar 2011 19:44:20 +0000 (UTC)

 Author: ed
 Date: Fri Mar 11 19:44:06 2011
 New Revision: 219529
 URL: http://svn.freebsd.org/changeset/base/219529
 
 Log:
   MFC r218844:
   
     Improve 256 color support.
   
     - Add screen-256color,
     - Improve rxvt-256color to set pa and op properly.
     - Add rxvt-unicode-256color as an alias to rxvt-256color.
   
     PR:           conf/152713, conf/153164
     Submitted by: Alexander Verbod and Frédéric Perrin
 
 Modified:
   stable/8/share/termcap/termcap.src
 Directory Properties:
   stable/8/share/termcap/   (props changed)
 
 Modified: stable/8/share/termcap/termcap.src
 ==============================================================================
 --- stable/8/share/termcap/termcap.src	Fri Mar 11 19:40:49 2011	(r219528)
 +++ stable/8/share/termcap/termcap.src	Fri Mar 11 19:44:06 2011	(r219529)
 @@ -2784,6 +2784,9 @@ SH|screen-s|VT 100/ANSI X3.64 virtual te
  	:ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen:
  SW|screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols:\
  	:co#132:tc=screen:
 +screen-256color|VT 100/ANSI X3.64 terminal with 256 colors:\
 +	:Co#256:pa#32767:\
 +	:AB=\E[48;5;%dm:AF=\E[38;5;%dm:tc=screen:
  # $Xorg: termcap,v 1.3 2000/08/17 19:55:10 cpqbld Exp $
  #
  # Note:
 @@ -4586,7 +4589,11 @@ rxvt|rxvt terminal emulator (X Window Sy
  	:pa#64:Co#8:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:tc=rxvt-mono:
  
  rxvt-256color|rxvt terminal emulator with 256 colors:\
 -	:Co#256:AF=\E[38;5;%dm:AB=\E[48;5;%dm:tc=rxvt-unicode:
 +	:Co#256:pa#32767:\
 +	:AB=\E[48;5;%dm:AF=\E[38;5;%dm:op=\E[39;49m:tc=rxvt-unicode:
 +
 +rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
 +	:tc=rxvt-256color:
  
  # Termcap entry for Eterm, taken from the sources of Eterm-0.9.2
  Eterm|Eterm Terminal Emulator (X11 Window System):\
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
