Re: [gentoo-user] Bringing mdocml to Gentoo, MANPATH woes
Joerg Schillingwrote: > I do no longer remember what triggered the problem. Very simple tables are > working. I should have mentioned that "mandoc" is IIRC 4x larger than the complete UNIX "man" subsystem made from: man(1) nroff(1) troff(1) tbl(1) eqn(1) col(1) ... more(1) mandoc is "lightweight" only if you compare it with "groff". Jörg -- EMail:jo...@schily.net(home) Jörg Schilling D-13353 Berlin joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'
Re: [gentoo-user] Bringing mdocml to Gentoo, MANPATH woes
Wolfgang Muellerwrote: > On Wed, Jan 04, 2017 at 16:32:02 +0100, Joerg Schilling wrote: > > If you think about replacing "man" by "mandoc", please keep in mind that > > "mandoc" displays many of the man pages incorrectly. > > > > This is caused by the fact that tables are not correctly understood by > > mandoc. > > Could you give me some example man pages for this? All tables I have > found so far (about one or two, since I don't know exactly where to > look) display correctly for me in mandoc. In any case, I was not aware > of this, so thanks for mentioning. Some time ago, I did an automated 100% test with all Solaris man pages: https://sourceforge.net/p/schillix-on/schillix-on/ci/default/tree/usr/src/man/ and mandoc failed miserably with nearly all of the man pages. I do no longer remember what triggered the problem. Very simple tables are working. Jörg -- EMail:jo...@schily.net(home) Jörg Schilling D-13353 Berlin joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'
Re: [gentoo-user] Bringing mdocml to Gentoo, MANPATH woes
On Wed, Jan 04, 2017 at 16:32:02 +0100, Joerg Schilling wrote: > If you think about replacing "man" by "mandoc", please keep in mind that > "mandoc" displays many of the man pages incorrectly. > > This is caused by the fact that tables are not correctly understood by mandoc. Could you give me some example man pages for this? All tables I have found so far (about one or two, since I don't know exactly where to look) display correctly for me in mandoc. In any case, I was not aware of this, so thanks for mentioning. -- Wolfgang Mueller / vehk.de / GPG 0xc543cfce9465f573 signature.asc Description: PGP signature
Re: [gentoo-user] Bringing mdocml to Gentoo, MANPATH woes
> Try the -dev list for the MANPATH thing. Shall do that. > I think "cron" might be a better global USE flag than "sqlite". Users > will think "oh, of course I want the apropos/whatis database to be > updated nightly" with USE=cron. Unless they happen to know that those > databases are implemented in sqlite, they'll probably just guess at the > meaning of USE=sqlite. Good point. I have the USE description in metadata.xml, but even there did not comment that cron scripts would be installed. Not sure whether to call it cron, because users would assume it would only install the cron script and not need sqlite for database generation. > I would also suggest dropping the "+" defaults unless doing so severely > cripples the package. The whole point of USE flags is that I can set > them and all ebuilds will use them -- that stops working if developers > make their own preferences default in ebuilds. I thought about dropping the default for sqlite, and will probably do so. As for manpager: it has + even in man-db, so I thought it would be best to keep that consistent. > [snip] > This might be more appropriate in pkg_config(), because it modifies a > file that doesn't belong to the package manager, namely mandoc.db. That > could also solve your MANPATH issue by dumb luck; I'm not sure what the > environment will look like during emerge --config. I will try that out, thanks very much for the suggestions/fixes. -- Wolfgang Mueller / vehk.de / GPG 0xc543cfce9465f573 signature.asc Description: PGP signature
Re: [gentoo-user] Bringing mdocml to Gentoo, MANPATH woes
On 01/04/2017 10:21 AM, Wolfgang Mueller wrote: > > I post this on the -user list because it seems to me that I have issues > relating to several distinct components. If this is better discussed > somewhere else, I would appreciate some pointers :) Try the -dev list for the MANPATH thing. > > You can find the ebuild (and corresponding files) here: > https://github.com/vehk/pramantha/tree/mdocml-wip/sys-apps/mdocml > I have some unrelated comments. > IUSE="+sqlite +manpager" I think "cron" might be a better global USE flag than "sqlite". Users will think "oh, of course I want the apropos/whatis database to be updated nightly" with USE=cron. Unless they happen to know that those databases are implemented in sqlite, they'll probably just guess at the meaning of USE=sqlite. I would also suggest dropping the "+" defaults unless doing so severely cripples the package. The whole point of USE flags is that I can set them and all ebuilds will use them -- that stops working if developers make their own preferences default in ebuilds. > src_configure() { > cp "${FILESDIR}/configure.local" . You need "|| die" after that cp. > ./configure Same here. If that's a "typical" configure script, the "econf" function might be easier. > install -Dm644 LICENSE "${D}/usr/share/licenses/${PN}/LICENSE" There's no need to install the LICENSE file, and it's actually our policy not to, since the text of every license is part of the ::gentoo tree. > pkg_postinst() { > if use sqlite; then > einfo "Creating mandoc.db database files." > makewhatis This might be more appropriate in pkg_config(), because it modifies a file that doesn't belong to the package manager, namely mandoc.db. That could also solve your MANPATH issue by dumb luck; I'm not sure what the environment will look like during emerge --config.
Re: [gentoo-user] Bringing mdocml to Gentoo, MANPATH woes
Wolfgang Muellerwrote: > Hello, list. > > For the past few days I have been working on bringing mdocml to Gentoo > as a full alternative to man-db. In the course of writing the ebuild, > I have come across some issues on which I would like to have some If you think about replacing "man" by "mandoc", please keep in mind that "mandoc" displays many of the man pages incorrectly. This is caused by the fact that tables are not correctly understood by mandoc. Jörg -- EMail:jo...@schily.net(home) Jörg Schilling D-13353 Berlin joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'
[gentoo-user] Bringing mdocml to Gentoo, MANPATH woes
Hello, list. For the past few days I have been working on bringing mdocml to Gentoo as a full alternative to man-db. In the course of writing the ebuild, I have come across some issues on which I would like to have some comments: 1. When submitting the ebuild through bugzilla, is it enough to note that virtual/man would need changes to reflect that mdocml satisfies it, or does that warrant a new bug (with depedency on the ebuild)? 2. I have asked about the next questions on freenode's #gentoo-dev-help channel already, but got no answer: What is the reasoning to suppress the MANPATH environment variable in ebuilds? Updating/creating the mandoc database in pkg_postinst will only pick up /usr/share/man, and fully ignore the gcc and binutils manpages that are correctly set in MANPATH. This also happens to man-db, which means that the manpages gcc and binutils bring will *never* show up in apropos or man -k. I'd be glad to open a bug about this, but wanted first to know if this is actually a feature. Note that MANPATH is also not set in the cron.daily script that man-db brings. You can easily verify this bug like so: $ man fsf-funding # this will correctly display the fsf-funding manpage $ apropos fsf # this will find fsfreeze/etc, but *not* fsf-funding On my testing system that has mdocml set up (and the correct paths fed into makewhatis), apropos indeed finds fsf-funding. I have not tested this with man-db yet, but I would assume that sourcing the environment or somehow setting MANPATH in the ebuild and the cron script would fix this and add the corresponding manpages to the man-db database. And with this, we come to... 3. What would be the best way to set the MANPATH in the ebuild and the cron script? It seems to me that sourcing /etc/profile in the ebuild's pkg_postinst is a terrible hack, and in my current ebuild (see end of this mail) I resolved to just let it run on /usr/share/man and to then alert the user. My cron.daily script indeed sources /etc/profile before running makewhatis. I post this on the -user list because it seems to me that I have issues relating to several distinct components. If this is better discussed somewhere else, I would appreciate some pointers :) You can find the ebuild (and corresponding files) here: https://github.com/vehk/pramantha/tree/mdocml-wip/sys-apps/mdocml -- Wolfgang Mueller / vehk.de / GPG 0xc543cfce9465f573 signature.asc Description: PGP signature