X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from psyche.piasta.pl (psyche.piasta.pl [83.175.144.5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id A730ED067E5 for ; Thu, 2 Jun 2011 12:45:30 +0000 (UTC) Received: from [10.0.20.128] (helo=desant) by psyche.piasta.pl with esmtpa (Pocztex KoBa) (envelope-from ) id 1QS7HA-0001jm-5o for alpine-devel@lists.alpinelinux.org; Thu, 02 Jun 2011 14:45:24 +0200 Date: Thu, 2 Jun 2011 14:45:23 +0200 From: Paul Onyschuk To: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [apkbuild] mdocml - man page tool Message-Id: <20110602144523.bfe3a323.blink@bojary.koba.pl> In-Reply-To: <20110601124222.ee2575ed.blink@bojary.koba.pl> References: <20110601122435.20658e79.blink@bojary.koba.pl> <20110601124222.ee2575ed.blink@bojary.koba.pl> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.10.14; i686-pc-mingw32) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Invalid-HELO: HELO is no FQDN (contains no dot) (See RFC2821 4.1.1.1) X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Date: 2011-06-02 14:45:24 I founded man(1)/apropos(1)/whatis(1) commands written in pure shell script. They were created by Gordon Tetlow, and can by obtained from FreeBSD -HEAD repository[1]. They're bigger than Busybox man(1), but with them mdocml package could be stanalone man toolset. File mk.sh could be copied to /usr/libexec and symlinked to /usr/bin/man, /usr/bin/apropos and /usr/bin/whatis. This way conflicts with groff man toolset could be avioded to some degree and user has choice of using groff or mdocml. Script requires some works, because it's groff oriented and using groff is all about pipes (if anyone wondered why it's so slow), example: $ /usr/bin/zcat -f /usr/share/man/man1/some-man.1 | tbl \ | groff -S -P-c -Wall -mtty-char -man -Tascii | /usr/bin/col | less And mdocml (tbl and eqn are build-in) example: $ mandoc -Tascii /usr/share/man/man1/some-man.1 | less This modification can be applied pretty easy (I've working copy). Some other features of mk.sh can be removed: - Support for so called cat pages (preformated man pages) - Support for localized man pages / AFAIK uclibc doesn't support locales - Some other minor things like platform specific lookups (searching for x86/x86_64 in section(4)) What is the point of all of this: - groff binaries are ~8.5MB (I don't count man(1) implementation, which isn't small either), where Apline Linux base system can be under 10MB - mdocml binary is ~230KB and mk.sh is ~20KB - mdocml is good enough replacment - some man pages can misbehave, but mdocml is geting better every day and there is also problem with badly formated man pages - mdocml is much much faster, to get more groff-like feeling use: $ sleep 0.7 && mandoc /usr/share/man/man1/some-man.1 | less I'm going into wilderness for few days, so this work will be postponed. [1] http://svnweb.freebsd.org/base/head/usr.bin/man/ -- Paul Onyschuk --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---