From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Nov 6 18:40:11 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A9BB106566B for ; Sun, 6 Nov 2011 18:40:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E663B8FC0A for ; Sun, 6 Nov 2011 18:40:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id pA6IeA5T025784 for ; Sun, 6 Nov 2011 18:40:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id pA6IeAAG025783; Sun, 6 Nov 2011 18:40:10 GMT (envelope-from gnats) Resent-Date: Sun, 6 Nov 2011 18:40:10 GMT Resent-Message-Id: <201111061840.pA6IeAAG025783@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Momchil Ivanov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65CBF106566B for ; Sun, 6 Nov 2011 18:31:06 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 3BDDB8FC0A for ; Sun, 6 Nov 2011 18:31:06 +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 pA6IV565075269 for ; Sun, 6 Nov 2011 18:31:05 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id pA6IV5Gn075268; Sun, 6 Nov 2011 18:31:05 GMT (envelope-from nobody) Message-Id: <201111061831.pA6IV5Gn075268@red.freebsd.org> Date: Sun, 6 Nov 2011 18:31:05 GMT From: Momchil Ivanov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/162339: sysutils/screen: Unable to start screen when $TERM is longer than 20 characters X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2011 18:40:11 -0000 >Number: 162339 >Category: ports >Synopsis: sysutils/screen: Unable to start screen when $TERM is longer than 20 characters >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 06 18:40:10 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Momchil Ivanov >Release: >Organization: >Environment: >Description: Unable to start screen when $TERM is longer than 20 characters, example TERM="rxvt-unicode-256color". It says "$TERM too long - sorry.". There is a bug report about this here http://savannah.gnu.org/bugs/?30880 and it is more than a year old. Inside there are links to patches, there are similar patches used on other projects: http://projects.archlinux.org/svntogit/packages.git/tree/screen/trunk/screen-4.0.3-long-term.patch Since nothing happens with the source code of screen, I am attaching a fix that adds the patch to the sysutils/screen port. The buffer is made 31+1 long, this leaves some room for longer TERM variables, though the length is arbitrary. >How-To-Repeat: export TERM="rxvt-unicode-256color" screen >Fix: Patch attached with submission follows: Index: patch-long-term =================================================================== --- patch-long-term (revision 0) +++ patch-long-term (revision 1205) @@ -0,0 +1,22 @@ +--- display.h 2011-11-06 10:23:29.000000000 +0100 ++++ display.h 2011-11-06 19:05:33.000000000 +0100 +@@ -85,7 +85,7 @@ + struct win *d_other; /* pointer to other window */ + int d_nonblock; /* -1 don't block if obufmax reached */ + /* >0: block after nonblock secs */ +- char d_termname[20 + 1]; /* $TERM */ ++ char d_termname[31 + 1]; /* $TERM */ + char *d_tentry; /* buffer for tgetstr */ + char d_tcinited; /* termcap inited flag */ + int d_width, d_height; /* width/height of the screen */ +--- screen.h 2011-11-06 10:23:29.000000000 +0100 ++++ screen.h 2011-11-06 18:33:52.000000000 +0100 +@@ -204,7 +204,7 @@ + char preselect[20]; + int esc; /* his new escape character unless -1 */ + int meta_esc; /* his new meta esc character unless -1 */ +- char envterm[20 + 1]; /* terminal type */ ++ char envterm[31 + 1]; /* terminal type */ + int encoding; /* encoding of display */ + } + attach; >Release-Note: >Audit-Trail: >Unformatted: