From owner-freebsd-questions@FreeBSD.ORG Sat Dec 5 06:55:21 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFB38106566B for ; Sat, 5 Dec 2009 06:55:21 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id 3E9868FC1B for ; Sat, 5 Dec 2009 06:55:21 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id nB56tKu5077764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 5 Dec 2009 00:55:20 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id nB56tJaq085138 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 5 Dec 2009 00:55:20 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id nB56tJh9085136; Sat, 5 Dec 2009 00:55:19 -0600 (CST) (envelope-from dan) Date: Sat, 5 Dec 2009 00:55:19 -0600 From: Dan Nelson To: Sagara Wijetunga Message-ID: <20091205065519.GC84026@dan.emsphone.com> References: <4B18CD57.5090108@tomahawk.com.sg> <20091204193219.GA84026@dan.emsphone.com> <4B19EC94.8040901@tomahawk.com.sg> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B19EC94.8040901@tomahawk.com.sg> X-OS: FreeBSD 7.2-STABLE User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: ClamAV version 0.94.1, clamav-milter version 0.94.1 on email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Sat, 05 Dec 2009 00:55:20 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: freebsd-questions@freebsd.org Subject: Re: malformed man pages X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 06:55:21 -0000 In the last episode (Dec 05), Sagara Wijetunga said: > Dan Nelson wrote: > > In the last episode (Dec 04), Sagara Wijetunga said: > >> > >> We have an issue on Tomahawk Desktop (an upcoming FreeBSD-based distro) > >> that all man pages malformed. > >> > >> Eg. man tar shows as follows: > >> 1mNAME0m > >> 1mtar 22m-- format of tape archive files > >> > >> 1mDESCRIPTION0m > >> The 1mtar 22marchive format collects any number of files, > >> directories, and > >> > > > > That looks sort of like malformed ANSI escape codes (bold would be "ESC > > [ 1 m", but the man utilities shouldn't be generating those. If you run > > "man 5 tar | hd | head", what do you get? I get this: > > > > 00000000 54 41 52 28 35 29 09 09 09 20 20 46 72 65 65 42 |TAR(5)... FreeB| > > 00000010 53 44 20 46 69 6c 65 20 46 6f 72 6d 61 74 73 20 |SD File Formats | > > 00000020 4d 61 6e 75 61 6c 09 09 09 54 41 52 28 35 29 0a |Manual...TAR(5).| > > 00000030 0a 4e 08 4e 41 08 41 4d 08 4d 45 08 45 0a 20 20 |.N.NA.AM.ME.E. | > > 00000040 20 20 20 74 08 74 61 08 61 72 08 72 20 2d 2d 20 | t.ta.ar.r -- | > > 00000050 66 6f 72 6d 61 74 20 6f 66 20 74 61 70 65 20 61 |format of tape a| > > 00000060 72 63 68 69 76 65 20 66 69 6c 65 73 0a 0a 44 08 |rchive files..D.| > > 00000070 44 45 08 45 53 08 53 43 08 43 52 08 52 49 08 49 |DE.ES.SC.CR.RI.I| > > 00000080 50 08 50 54 08 54 49 08 49 4f 08 4f 4e 08 4e 0a |P.PT.TI.IO.ON.N.| > > 00000090 20 20 20 20 20 54 68 65 20 74 08 74 61 08 61 72 | The t.ta.ar| > > > > The doubled letters are handled by /usr/bin/less and converted to bold > > before displaying. If you get the same hd output as I have above, then > > we know that the manpage is fine, and your problem is in /usr/bin/less > > or your terminal type is incorrect. If you see ANSI escape codes in the > > hd output, then we know the problem is with the manpage tools. > > Here is what I get: > > man 5 tar | hd | head > > /usr/share/groff/1.20.1/tmac/doc.tmac:3375: bad character definition ^ this looks suspicious. doc.tmac should live at /usr/share/tmac/doc.tmac > 00000000 54 41 52 28 35 29 09 09 09 20 20 20 20 42 53 44 |TAR(5)... BSD| > 00000010 20 46 69 6c 65 20 46 6f 72 6d 61 74 73 20 4d 61 |File Formats Ma| > 00000020 6e 75 61 6c 09 09 09 54 41 52 28 35 29 0a 0a 31 |nual...TAR(5)..1| > 00000030 6d 4e 41 4d 45 30 6d 0a 20 20 20 20 20 31 6d 74 |mNAME0m. 1mt| > 00000040 61 72 20 32 32 6d 2d 2d 20 66 6f 72 6d 61 74 20 |ar 22m-- format | > 00000050 6f 66 20 74 61 70 65 20 61 72 63 68 69 76 65 20 |of tape archive | > 00000060 66 69 6c 65 73 0a 0a 31 6d 44 45 53 43 52 49 50 |files..1mDESCRIP| > 00000070 54 49 4f 4e 30 6d 0a 20 20 20 20 20 54 68 65 20 |TION0m. The | > 00000080 31 6d 74 61 72 20 32 32 6d 61 72 63 68 69 76 65 |1mtar 22marchive| > 00000090 20 66 6f 72 6d 61 74 20 63 6f 6c 6c 65 63 74 73 | format collects| > Error executing formatting or display command. > system command exited with status 36096 > No entry for tar in section 5 of the manual ^ the above 3 lines you can ignore; man is just complaining because we ^ stopped reading its output after a few lines. > We use /usr/bin/less from ftp://ftp.gnu.org/gnu/less, the > less-382.tar.gz, unpatched. > > Does the less need to be patched in FreeBSD? If so, is there such a > patch exist? Since your output differs from mine, the manpages are getting damaged before they reach /usr/bin/less. Have you maybe installed your own copy of GNU groff? The original source enables ANSI escapes in manpages, but the version in FreeBSD disables them. Make sure your /usr/share/tmac/troffrc matches the content at http://svn.freebsd.org/viewvc/base/stable/8/contrib/groff/tmac/troffrc?view=markup , especially the last 10 lines or so, and check for other installations of groff. -- Dan Nelson dnelson@allantgroup.com