From nobody Thu Mar 28 22:52:27 2024 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 A1DD5CCFD12 for ; Wed, 1 Jun 2011 10:24:29 +0000 (UTC) Received: from [10.0.20.128] (helo=desant) by psyche.piasta.pl with esmtpa (Pocztex KoBa) (envelope-from ) id 1QRibA-0003yd-Kh for alpine-devel@lists.alpinelinux.org; Wed, 01 Jun 2011 12:24:26 +0200 Date: Wed, 1 Jun 2011 12:24:35 +0200 From: Paul Onyschuk To: alpine-devel@lists.alpinelinux.org Subject: [alpine-devel] [apkbuild] mdocml - man page tool Message-Id: <20110601122435.20658e79.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: multipart/mixed; boundary="Multipart=_Wed__1_Jun_2011_12_24_35_+0200_tEY/Zb1cP/Tc.pCd" 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-01 12:24:26 This is a multi-part message in MIME format. --Multipart=_Wed__1_Jun_2011_12_24_35_+0200_tEY/Zb1cP/Tc.pCd Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Mdocml[1] is sane groff replacment for processing man/mdoc pages. It can be used like this: $ mandoc /usr/share/man/man1/some-man.1 | less It has also support for html output, so it can be piped to webrowser: $ mandoc -Thtml /usr/share/man/man1/some-man.1 | lynx -stdin I checked some manuals (python, openssl) and they works just fine. APKBUILD[2] is straightforward - please point out my mistakes ;) I don't know if it works under x86_64. Busybox man(1) command can be easy modified to use mdocml isteed of groff. After building Busybox with patch[3], simple commands can be used: $ man some-man This patch is optional, just to show how it can be done. Mdocml tool makewhatis(1) can be build also (subpackage?) to create apropos/whereis database. [1] http://mdocml.bsd.lv/ [2] import-mdocml-1.11.3.patch [3] add-support-for-mdocml-in-busybox-man-1.patch -- Paul Onyschuk --Multipart=_Wed__1_Jun_2011_12_24_35_+0200_tEY/Zb1cP/Tc.pCd Content-Type: application/octet-stream; name="add-support-for-mdocml-in-busybox-man-1.patch" Content-Disposition: attachment; filename="add-support-for-mdocml-in-busybox-man-1.patch" Content-Transfer-Encoding: base64 RnJvbSA3ZmU0YzQzNjc1MzQwMTg4ZWU5NTY4MzU1ZTFlOGQ0YTIzNWQ0NjYyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIE9ueXNjaHVrIDxibGlua0Bib2phcnkua29iYS5wbD4K RGF0ZTogVHVlLCAzMSBNYXkgMjAxMSAxODozODowMyArMDAwMApTdWJqZWN0OiBbUEFUQ0hdIGFk ZCBzdXBwb3J0IGZvciBtZG9jbWwgaW4gYnVzeWJveCBtYW4oMSkKCi0tLQogbWFpbi9idXN5Ym94 L0FQS0JVSUxEICAgICAgICAgIHwgICAgNCArKystCiBtYWluL2J1c3lib3gvYnVzeWJveC1tYW4u cGF0Y2ggfCAgIDExICsrKysrKysrKysrCiBtYWluL2J1c3lib3gvYnVzeWJveGNvbmZpZyAgICAg fCAgICAyICstCiAzIGZpbGVzIGNoYW5nZWQsIDE1IGluc2VydGlvbnMoKyksIDIgZGVsZXRpb25z KC0pCiBjcmVhdGUgbW9kZSAxMDA2NDQgbWFpbi9idXN5Ym94L2J1c3lib3gtbWFuLnBhdGNoCgpk aWZmIC0tZ2l0IGEvbWFpbi9idXN5Ym94L0FQS0JVSUxEIGIvbWFpbi9idXN5Ym94L0FQS0JVSUxE CmluZGV4IDhlNWE2NTMuLjBmYTllMWQgMTAwNjQ0Ci0tLSBhL21haW4vYnVzeWJveC9BUEtCVUlM RAorKysgYi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eQogQ09ORklHX01PVU5UUE9JTlQ9eQogIyBDT05GSUdf TVQgaXMgbm90IHNldAotLSAKMS43LjQuNQoK --Multipart=_Wed__1_Jun_2011_12_24_35_+0200_tEY/Zb1cP/Tc.pCd Content-Type: application/octet-stream; name="import-mdocml-1.11.3.patch" Content-Disposition: attachment; filename="import-mdocml-1.11.3.patch" Content-Transfer-Encoding: base64 RnJvbSA1ZWI2YzZkMTQ0MGU5MGM4YTc0NmQxNTU0ZDQ0NThiYTUzMmQyNjJhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIE9ueXNjaHVrIDxibGlua0Bib2phcnkua29iYS5wbD4K RGF0ZTogVHVlLCAzMSBNYXkgMjAxMSAxOTowMDoxNCArMDAwMApTdWJqZWN0OiBbUEFUQ0hdIGlt cG9ydCBtZG9jbWwtMS4xMS4zCgotLS0KIG1haW4vbWRvY21sL0FQS0JVSUxEIHwgICAyNSArKysr KysrKysrKysrKysrKysrKysrKysrCiAxIGZpbGVzIGNoYW5nZWQsIDI1IGluc2VydGlvbnMoKyks IDAgZGVsZXRpb25zKC0pCiBjcmVhdGUgbW9kZSAxMDA2NDQgbWFpbi9tZG9jbWwvQVBLQlVJTEQK CmRpZmYgLS1naXQgYS9tYWluL21kb2NtbC9BUEtCVUlMRCBiL21haW4vbWRvY21sL0FQS0JVSUxE Cm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmZiZjU5N2EKLS0tIC9kZXYvbnVs bAorKysgYi9tYWluL21kb2NtbC9BUEtCVUlMRApAQCAtMCwwICsxLDI1IEBACisjIENvbnRyaWJ1 dG9yOgorIyBNYWludGFpbmVyOgorcGtnbmFtZT1tZG9jbWwKK3BrZ3Zlcj0xLjExLjMKK3BrZ3Jl bD0wCitwa2dkZXNjPSJNYW4gcGFnZSB0b29sIChtZG9jIG1hY3JvIGNvbXBpbGVyKSIKK3VybD0i aHR0cDovL21kb2NtbC5ic2QubHYiCithcmNoPSJhbGwiCitsaWNlbnNlPSJCU0QiCitzdWJwYWNr YWdlcz0iJHBrZ25hbWUtZGV2ICRwa2duYW1lLWRvYyIKK3NvdXJjZT0iJHVybC9zbmFwc2hvdHMv JHBrZ25hbWUtJHBrZ3Zlci50YXIuZ3oiCisKK19idWlsZGRpcj0iJHNyY2RpciIvJHBrZ25hbWUt JHBrZ3ZlcgorCitidWlsZCgpIHsKKwljZCAiJF9idWlsZGRpciIKKwltYWtlIFBSRUZJWD0vdXNy IE1BTkRJUj0vdXNyL3NoYXJlL21hbiB8fCByZXR1cm4gMQorfQorCitwYWNrYWdlKCkgeworCWNk ICIkX2J1aWxkZGlyIgorCW1ha2UgUFJFRklYPS91c3IgTUFORElSPS91c3Ivc2hhcmUvbWFuIERF U1RESVI9IiRwa2dkaXIiIGluc3RhbGwgfHwgcmV0dXJuIDEKK30KKworbWQ1c3Vtcz0iNDk3YjQy NzhhY2I5NmEwODdlZTZmOTJjNjRiNGE1NmQgIG1kb2NtbC0xLjExLjMudGFyLmd6IgotLSAKMS43 LjQuNQoK --Multipart=_Wed__1_Jun_2011_12_24_35_+0200_tEY/Zb1cP/Tc.pCd-- --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org --- From nobody Thu Mar 28 22:52:27 2024 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 55847CD02EA for ; Wed, 1 Jun 2011 10:42:14 +0000 (UTC) Received: from [10.0.20.128] (helo=desant) by psyche.piasta.pl with esmtpa (Pocztex KoBa) (envelope-from ) id 1QRisN-0007DS-7S for alpine-devel@lists.alpinelinux.org; Wed, 01 Jun 2011 12:42:11 +0200 Date: Wed, 1 Jun 2011 12:42:22 +0200 From: Paul Onyschuk To: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [apkbuild] mdocml - man page tool Message-Id: <20110601124222.ee2575ed.blink@bojary.koba.pl> In-Reply-To: <20110601122435.20658e79.blink@bojary.koba.pl> References: <20110601122435.20658e79.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-01 12:42:11 I forgot to mention that with Busybox man(1) patch you need also specify man pages path e.g.: $ echo "MANDATORY_MANPATH /usr/share/man" > /etc/man_db.conf Alternatively you can set $MANPATH: $ export MANPATH=/usr/share/man or just put this in your .profile. -- Paul Onyschuk --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org --- From nobody Thu Mar 28 22:52:27 2024 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 --- From nobody Thu Mar 28 22:52:27 2024 X-Original-To: alpine-devel@lists.alpinelinux.org Delivered-To: alpine-devel@mail.alpinelinux.org Received: from mail.wtbts.no (mail.wtbts.no [213.234.126.131]) by mail.alpinelinux.org (Postfix) with ESMTP id 1E123D06EE5 for ; Thu, 2 Jun 2011 13:29:38 +0000 (UTC) Received: from localhost (bsna.nor.wtbts.net [127.0.0.1]) by mail.wtbts.no (Postfix) with ESMTP id 60C40AE4002; Thu, 2 Jun 2011 13:29:36 +0000 (UTC) X-Virus-Scanned: Yes Received: from mail.wtbts.no ([127.0.0.1]) by localhost (bsna.nor.wtbts.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W5O+2pcSo0qN; Thu, 2 Jun 2011 13:29:26 +0000 (UTC) Received: from mail.ytre.org (extmail.nor.wtbts.net [10.65.72.14]) by mail.wtbts.no (Postfix) with ESMTP id 4816E376277; Thu, 2 Jun 2011 13:29:26 +0000 (UTC) Received: from mail.ytre.org (localhost [127.0.0.1]) by mail.ytre.org (Postfix) with ESMTP id E5A4960A7EF94; Thu, 2 Jun 2011 13:29:25 +0000 (UTC) Received: from ncopa-desktop.nor.wtbts.net (ncopa-desktop.nor.wtbts.net [10.65.65.1]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ncopa@ytre.org) by mail.ytre.org (Postfix) with ESMTPSA id C3C3260A7EF93; Thu, 2 Jun 2011 13:29:25 +0000 (UTC) Date: Thu, 2 Jun 2011 15:25:38 +0200 From: Natanael Copa To: Paul Onyschuk Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] [apkbuild] mdocml - man page tool Message-ID: <20110602152538.066ee77d@ncopa-desktop.nor.wtbts.net> In-Reply-To: <20110602144523.bfe3a323.blink@bojary.koba.pl> References: <20110601122435.20658e79.blink@bojary.koba.pl> <20110601124222.ee2575ed.blink@bojary.koba.pl> <20110602144523.bfe3a323.blink@bojary.koba.pl> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.4; x86_64-unknown-linux-gnu) 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-Virus-Scanned: ClamAV using ClamSMTP On Thu, 2 Jun 2011 14:45:23 +0200 Paul Onyschuk wrote: > 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. It makes sense to use a separate toolset since we have separate -doc packages. ... > 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 The above reasons are more than enough. I've wanted mdocml for some time but never had time to follow it up properly. > I'm going into wilderness for few days, so this work will be > postponed. Thanks! I look forward to the continuation of this! > > [1] http://svnweb.freebsd.org/base/head/usr.bin/man/ > -nc --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---