Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616776 - app-text/mandoc: ebuild improvements & man-db drop-in replacement
Summary: app-text/mandoc: ebuild improvements & man-db drop-in replacement
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2017-04-27 18:19 UTC by Wolfgang Müller
Modified: 2020-12-11 12:22 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
New mandoc ebuild. (mdocml-1.14.1-r1.ebuild,1.32 KB, text/plain)
2017-04-27 18:19 UTC, Wolfgang Müller
Details
Updated ebuild. (mandoc-1.14.3-r1.ebuild,1.24 KB, text/plain)
2018-01-08 01:51 UTC, Wolfgang Müller
Details
Rebased patch on current tree (mandoc-ebuid.patch,2.76 KB, patch)
2019-05-06 11:12 UTC, Wolfgang Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Müller 2017-04-27 18:19:58 UTC
Created attachment 471102 [details]
New mandoc ebuild.

I have been working on an ebuild to bring mandoc to Gentoo for some time.

Recently I noticed that a mandoc ebuild was indeed added in January, but as noted in bug #559926 there are some caveats. The newest version of mandoc also drops the sqlite dependency, which is still referenced in the current ebuild.

My ebuild aims to fix the caveats and provide a full man-db replacement:

1. I have included a patch that adds full bzip2 support (both for displaying compressed manpages and adding them to the mandoc database).

2. mandoc now honors the MANPATH environment variable fully.

3. mandoc's database files need to be kept up-to-date. The user is alerted to generate the initial database with makewhatis. The cron useflag installs an entry in cron.daily which updates all databases. Small caveats remaining: 
    * sudo suppresses MANPATH, makewhatis has to be run as root directly.
    * MANPATH is not available in cron [1], solved by sourcing /etc/profile

4. In this form, mandoc conflicts with sys-apps/man-db, sys-apps/man, and sys-apps/groff. The conflict with groff can possibly be dropped by renaming mandoc's soelim. man-db and man should not be installed on a system with mandoc, as it is expected that mandoc acts as a full replacement.

5. Because of this, mandoc has to be added to the virtual/man ebuild.

6. The sqlite dependency has been dropped as of 1.14.1.


See the attachment for the ebuild, [2] for the relevant files, and [3] for the virtual/man change.

[1] https://archives.gentoo.org/gentoo-dev/message/9603ca920d000cd7f4c41a85cb44b69a
[2] https://github.com/vehk/pramantha/tree/master/sys-apps/mdocml/files
[3] https://github.com/vehk/pramantha/tree/master/virtual/man
Comment 1 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2018-01-08 01:17:16 UTC
Comment on attachment 471102 [details]
New mandoc ebuild.

your ebuild does not refflect current EAPI standards though (see EAPI=6 references)
Comment 2 Wolfgang Müller 2018-01-08 01:51:48 UTC
Created attachment 513732 [details]
Updated ebuild.
Comment 3 SpanKY gentoo-dev 2018-06-19 14:38:30 UTC
Comment on attachment 513732 [details]
Updated ebuild.

mandoc has been in the tree before this bug was filed (see bug 559926).  please rebase on top of that and attach a diff instead of a full ebuild.
Comment 4 Wolfgang Müller 2019-05-06 11:12:12 UTC
Created attachment 575404 [details, diff]
Rebased patch on current tree

A few notes:

1. The db-install target does not exist anymore in the Makefile.

2. As per my original intent, the patched ebuild conflicts with sys-apps/man and sys-apps/man-db. I have not included a patch for virtual/man; the changes there are trivial.

3. The changes to BINM_SOELIM and MANM_ROFF are needed to resolve conflicts with sys-apps/groff.

4. The changes to MANM_MAN and MANM_MDOC are needed to resolve conflicts with sys-apps/man-pages. Note that starting with sys-apps/man-pages-5.00, man-pages does not include mdoc(7) anymore, so once this is stabilized and old ebuilds are dropped, MANM_MDOC=mandoc_mdoc can be removed.

5. From a quick glance I think the ebuild can be moved to EAPI 7 without any changes.

6. You may want to consider moving app-text/mandoc to sys-apps/mandoc.
Comment 5 Larry the Git Cow gentoo-dev 2020-12-11 12:22:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21fccd433a95f545ac5407c0f58020bd010a38c6

commit 21fccd433a95f545ac5407c0f58020bd010a38c6
Author:     epsilonKNOT <gentoo@aisha.cc>
AuthorDate: 2020-11-29 01:47:52 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2020-12-11 12:22:18 +0000

    app-text/mandoc: allow mandoc as default man provider
    
    only supports using gzip
    
    Add musl patch from
    Wolfgang Mueller <wolf+gentoo@oriole.systems>
    
    Closes: https://bugs.gentoo.org/616776
    
    Package-Manager: Portage-3.0.10, Repoman-3.0.2
    Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 .../files/mandoc-1.14.5-r1-www-install.patch       |  19 ++++
 app-text/mandoc/files/mandoc.cron-r0               |   6 ++
 app-text/mandoc/mandoc-1.14.5-r1.ebuild            | 118 +++++++++++++++++++++
 app-text/mandoc/metadata.xml                       |   4 +
 4 files changed, 147 insertions(+)