From nobody@FreeBSD.org  Wed May 17 17:31:32 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AB3F216A8D8
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 May 2006 17:31:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 73EB743D5A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 May 2006 17:31:32 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k4HHVWNb009344
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 17 May 2006 17:31:32 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k4HHVW9K009343;
	Wed, 17 May 2006 17:31:32 GMT
	(envelope-from nobody)
Message-Id: <200605171731.k4HHVW9K009343@www.freebsd.org>
Date: Wed, 17 May 2006 17:31:32 GMT
From: Stephen Hurd <shurd@sasktel.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: mergemaster(8) doesn't handle /usr/share/misc/termcap
X-Send-Pr-Version: www-2.3

>Number:         97407
>Category:       bin
>Synopsis:       /usr/share/misc/termcap overwritten by installworld
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 17 17:40:19 GMT 2006
>Closed-Date:    Mon Apr 16 21:11:07 GMT 2007
>Last-Modified:  Mon Apr 16 21:11:07 GMT 2007
>Originator:     Stephen Hurd
>Release:        6.1-RELEASE
>Organization:
>Environment:
FreeBSD server.hurd.local 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Wed May 10 03:22:33 CST 2006     admin@server.hurd.local:/usr/obj/usr/src/sys/SERVER  i386

>Description:
After a source upgrade from 6.0 to 6.1, my custom termcap entries were lost.  It didn't occur to me that termcap wasn't *really* in /etc, so mergemaster doesn't handle it.  Definatly violated POLA for me.
>How-To-Repeat:
Modify your termcap... install world.
>Fix:
Modify mergemaster to handle /usr/share/misc/termcap
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->dougb 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed May 24 18:01:26 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97407 
State-Changed-From-To: open->feedback 
State-Changed-By: dougb 
State-Changed-When: Wed May 24 22:37:08 UTC 2006 
State-Changed-Why:  

As I understand it, the canonical way to solve this problem is 
to copy the file to /etc, and make your changes there. Since 
the file in usr/share is installed by installworld, even if 
mergemaster dealt with your changes on a one time basis, 
the next installworld would cause the same problem you saw. 

Does editing a copy of the file in /etc meet your needs? 

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

From: Stephen Hurd <shurd@sasktel.net>
To: Doug Barton <dougb@FreeBSD.org>, bug-followup@freebsd.org
Cc:  
Subject: Re: bin/97407: mergemaster(8) doesn't handle /usr/share/misc/termcap
Date: Wed, 24 May 2006 21:48:08 -0600

 > Does editing a copy of the file in /etc meet your needs?
 >   
 Not unless /usr/share/misc/termcap.db is generated from the symlink in 
 /etc in an installworld which (iirc) it isn't.  Editing a copy in /etc 
 would be no different from editing a copy in ~root or anywhere else.  
 The basic problem is that you need to manually fiddle around after any 
 upgrade to get your (for example) Link MC/5 terminals running at 132x43 
 working properly again.  They're configured correctly in /etc (gettytab, 
 ttys) but every time you do an installworld, you need to manually 
 regenerate /usr/share/misc/termcap.db from some other file (which you 
 *should* merge with the stock /usr/share/misc/termcap) because every 
 single installworld will break any terminal using a non-stock termcap entry.
 
 OTOH, if installworld *does* build termcap.db from /etc, why is the one 
 in /usr/share/misc not a symlink to the one in /etc?  I've always 
 wondered about that one, but thought that complaining would just be 
 bikeshedding... but I have lost at least one painstakingly generated 
 termcap entry on my home system from editing via the /etc symlink and 
 (much) later upgrading... backing up that directory is even more 
 non-obvious than backing up /usr/X11R6/lib/X11/xdm (another one that bit 
 me at home, but at least there I *knew* that I edited files in that dir)
 
 But yeah, ideally termcap should live in /etc and if there's some reason 
 for it to exist in /usr/share/misc too (one I'm utterly unaware of) then 
 the one in /usr/share/misc should be the symlink.  That way, mergemaster 
 would Just Work and even us freaks with dumb terminals that have custom 
 settings would stay happy.  However, having my terminals keep working 
 without needing to have a sticky note somewhere reminding me to restore 
 the correct termcap on any installworld is the goal.  I really don't 
 care how it's accomplished.  :-)
 
 My opinion is very much that having all your terminals stop working on 
 every upgrade unless you perform a manual merging/restoring separate 
 from the automated merge is a gross violation of POLA.
   I do, however, understand that I'm the last person in the world using 
 dumb terminals with non-standard termcap entries... my settings are odd 
 enough that I don't believe that having them included in the stock 
 termcap actually makes any sense.
State-Changed-From-To: feedback->open 
State-Changed-By: dougb 
State-Changed-When: Thu May 25 18:52:24 UTC 2006 
State-Changed-Why:  

What you're asking for is well beyond the scope of what mergemaster 
is really designed to handle. You might want to post something 
on freebsd-questions@freebsd.org about this issue and ask how others 
tackle these problems.  


Responsible-Changed-From-To: dougb->freebsd-bugs 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Thu May 25 18:52:24 UTC 2006 
Responsible-Changed-Why:  

Not in my area, and I don't have time to tackle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97407 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Mon Apr 16 21:09:57 UTC 2007 
State-Changed-Why:  
This is by design; to make your termcap changes permanent, 
please edit src/share/termcap/termcap.src.  For example, 
I have the following diff locally: 

Index: share/termcap/termcap.src 
=================================================================== 
RCS file: /home/ncvs/src/share/termcap/termcap.src,v 
retrieving revision 1.144 
diff -u -p -r1.144 termcap.src 
--- share/termcap/termcap.src   5 Jun 2004 15:35:14 -0000       1.144 
+++ share/termcap/termcap.src   11 Aug 2006 08:27:27 -0000 
@@ -2805,8 +2805,8 @@ xterm-xfree86|XFree86 xterm: 
:k1=EOP:k2=EOQ:k3=EOR:k4=EOS: 
:k5=E[15~:k6=E[17~:k7=E[18~:k8=E[19~: 
:k9=E[20~:k;=E[21~:F1=E[23~:F2=E[24~: 
-       :kH=EOF:@7=EOF:kI=E[2~: 
-       :kh=EOH:*6=EOF:kP=E[5~:kN=E[6~: 
+       :@7=EOF:kI=E[2~: 
+       :kh=EOH:kP=E[5~:kN=E[6~: 
:ku=EOA:kd=EOB:kr=EOC:kl=EOD:Km=E[M:tc=xterm-basic: 
# 
# This chunk is used for building the VT220/Sun/PC keyboard variants. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97407 
>Unformatted:
