| Summary: | /usr/share/misc/termcap overwritten by installworld | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Stephen Hurd <shurd> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 6.1-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Stephen Hurd
2006-05-17 18:40:19 UTC
Responsible Changed From-To: freebsd-bugs->dougb Over to maintainer. State Changed From-To: open->feedback 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? > 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 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 Not in my area, and I don't have time to tackle this. State Changed From-To: open->closed 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. |