Hi,

Stuart Henderson wrote on Fri, Jun 22, 2018 at 10:05:07AM +0100:
> On 2018/06/22 09:39, Landry Breuil wrote:
>> On Thu, Jun 21, 2018 at 06:09:31PM +0200, Ingo Schwarze wrote:
>>> Norm Finlay wrote on Wed, Jun 20, 2018 at 04:55:04PM -0500:

>>>> Installing the graphing package "grace" created the following warnings.
>>>> This occurred in the v6.3 release.  The folks on irc suggested I email this
>>>> to ports@openbsd.org.

>>> Right.  The post-install target is plainly wrong.  Never install
>>> manual pages outside the intended manpath.  Mandoc doesn't allow
>>> that.

>> Hmmm. Isnt it what tcl/tk and a bunch of other ports are doing, for
>> perfectly valid reasons ? what if you have a package installing
>> manpages with 'generic' names ?

> That's a different case, there the manuals are just installed to a
> different directory and you use -m/MANPATH/man.conf to locate them,
> here they're installed to a different directory and symlinked.

Stuat is of course spot on.  I already had the following more detailed
explanation written when his answer arrived and just failed to send it;
sending it anyway for the possible benefit of list members less
familiar with how these things work.

I'm appending the proposed patch again at the end for convenience
in case anybody wants to OK it.

Yours,
  Ingo


 ----- 8< ----- schnipp ----- >8 ----- 8< ----- schnapp ----- >8 -----

> Hmmm. Isnt it what tcl/tk and a bunch of other ports are doing, for
> perfectly valid reasons ?

Sorry for being unclear by being terse.  For tcl and some other
ports, the intended manpath is e.g. /usr/local/lib/tcl/tcl8.6/man/.
That manpath is intentionally outside the manpaths searched by
default, such that it can only be accessed by explicit -M/-m, by
setting $MANPATH, or by setting "manpath" in man.conf(5).  That is OK.

What this port is trying to do is installing the manual pages in
/usr/local/grace/doc/, which is outside any manpath, and then trying
to symlink them into /usr/local/man/.  That does not fully work
with makewhatis(8).

> what if you have a package installing
> manpages with 'generic' names ?

You mean like /usr/local/lib/tcl/tcl8.6/man/mann/close.n ?
In a private manpath, that is OK, it won't disturb "man close".

Or you mean like "ls" from GNU coreutils wanting to install ls(1)?
That is not OK, and that's why we rename it to "gls" - both the
program and the manual.  Note that you still get

   $ man -w ls
  /usr/share/man/man1/ls.1
  /usr/local/man/man1/gls.1

   $ man -a ls | col -b | grep -A 1 ^NAME
  NAME
     ls  list directory contents
  NAME
       ls - list directory contents

But again, that's OK, in plain man(1), base system pages are
preferred, and that you also get the ports variants with -w and -a
is actually helpful.

Or you mean like python-2.7.14 and python-3.6.5 both wanting to
install python(1)?  That's usually solved by having file names like

   $ man -w python
  /usr/local/man/man1/python2.1
  /usr/local/man/man1/python3.1

with the NAME sections in both just saying "python" without a
version number, such that "man python" can find both.

 ----- 8< ----- schnipp ----- >8 ----- 8< ----- schnapp ----- >8 -----

Index: Makefile
===================================================================
RCS file: /cvs/ports/math/grace/Makefile,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile
--- Makefile    5 May 2016 19:52:28 -0000       1.43
+++ Makefile    21 Jun 2018 16:04:40 -0000
@@ -3,7 +3,7 @@
 COMMENT=       GRaphing, Advanced Computation and Exploration of data
 
 DISTNAME=      grace-5.1.15
-REVISION=      7
+REVISION=      8
 CATEGORIES=    math
 
 HOMEPAGE=      http://plasma-gate.weizmann.ac.il/Grace/
@@ -71,12 +71,12 @@ post-install:
        ln -sf ${GRACE_DIR}/bin/xmgrace ${PREFIX}/bin/grace
        ln -sf ${GRACE_DIR}/bin/xmgrace ${PREFIX}/bin/gracebat
        ln -sf ${GRACE_DIR}/bin/xmgrace ${PREFIX}/bin/xmgrace
-       ln -sf ../../grace/doc/xmgrace.1 ${PREFIX}/man/man1/xmgrace.1
+       mv ${PREFIX}/grace/doc/xmgrace.1 ${PREFIX}/man/man1/xmgrace.1
 .endif
        ln -sf ${GRACE_DIR}/include/grace_np.h ${PREFIX}/include/grace_np.h
        ln -sf ${GRACE_DIR}/lib/libgrace_np.a ${PREFIX}/lib/libgrace_np.a
-       ln -sf ../../grace/doc/grace.1 ${PREFIX}/man/man1/grace.1
-       ln -sf ../../grace/doc/gracebat.1 ${PREFIX}/man/man1/gracebat.1
-       ln -sf ../../grace/doc/grconvert.1 ${PREFIX}/man/man1/grconvert.1
+       mv ${PREFIX}/grace/doc/grace.1 ${PREFIX}/man/man1/grace.1
+       mv ${PREFIX}/grace/doc/gracebat.1 ${PREFIX}/man/man1/gracebat.1
+       mv ${PREFIX}/grace/doc/grconvert.1 ${PREFIX}/man/man1/grconvert.1
 
 .include <bsd.port.mk>
Index: pkg/PFRAG.no-no_x11
===================================================================
RCS file: /cvs/ports/math/grace/pkg/PFRAG.no-no_x11,v
retrieving revision 1.2
diff -u -p -r1.2 PFRAG.no-no_x11
--- pkg/PFRAG.no-no_x11 8 Oct 2004 10:37:24 -0000       1.2
+++ pkg/PFRAG.no-no_x11 21 Jun 2018 16:04:40 -0000
@@ -1,5 +1,4 @@
 @comment $OpenBSD: PFRAG.no-no_x11,v 1.2 2004/10/08 10:37:24 espie Exp $
 bin/xmgrace
-grace/bin/xmgrace
-grace/doc/xmgrace.1
+@bin grace/bin/xmgrace
 @man man/man1/xmgrace.1
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/math/grace/pkg/PLIST,v
retrieving revision 1.6
diff -u -p -r1.6 PLIST
--- pkg/PLIST   8 Oct 2004 10:37:24 -0000       1.6
+++ pkg/PLIST   21 Jun 2018 16:04:40 -0000
@@ -7,10 +7,10 @@ grace/auxiliary/README
 grace/auxiliary/convcal.c
 grace/auxiliary/magic.grace
 grace/bin/
-grace/bin/convcal
+@bin grace/bin/convcal
 grace/bin/fdf2fit
 grace/bin/gracebat
-grace/bin/grconvert
+@bin grace/bin/grconvert
 grace/doc/
 grace/doc/10.1.dat
 grace/doc/10a.dat
@@ -30,9 +30,6 @@ grace/doc/Tutorial.html
 grace/doc/UsersGuide.dvi
 grace/doc/UsersGuide.html
 grace/doc/convcal.1
-grace/doc/grace.1
-grace/doc/gracebat.1
-grace/doc/grconvert.1
 grace/doc/mygraph.png
 grace/doc/nohelp.html
 grace/doc/philosophical-gnu-sm.jpg

Reply via email to