Re: lftp man page broken

2016-09-13 Thread Anthony J. Bentley
Jiri B writes:
> Hi,
> 
> lftp man pages is odd, see section for 'mirror' command.

The lftp(1) manual uses tbl(7) macros, which need extra preprocessing.
pkg_create(1) doesn't do any preprocessing... although that's easy
enough to fix. (Anyone have an idea of how many USE_GROFF manuals use
troff preprocessors? Is it worth it?)

USE_GROFF could also be removed from lftp. It's got some spacing and
line wrapping issues in mandoc though.

Index: OpenBSD/PackingElement.pm
===
RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/PackingElement.pm,v
retrieving revision 1.244
diff -u -p -r1.244 PackingElement.pm
--- OpenBSD/PackingElement.pm   25 Jun 2016 18:02:59 -  1.244
+++ OpenBSD/PackingElement.pm   13 Sep 2016 09:22:17 -
@@ -655,7 +655,7 @@ sub format
chdir($dir) or die "Can't chdir to $dir";
},
OpenBSD::Paths->groff,
-   qw(-mandoc -mtty-char -E -Ww -Tascii -P -c),
+   qw(-mandoc -mtty-char -E -Ww -Tascii -t -P -c),
@extra, '--', $file);
} else {
die "Can't parse source name $fname";



Re: lftp man page broken

2016-09-13 Thread Marc Espie
On Tue, Sep 13, 2016 at 03:32:05AM -0600, Anthony J. Bentley wrote:
> Jiri B writes:
> > Hi,
> > 
> > lftp man pages is odd, see section for 'mirror' command.
> 
> The lftp(1) manual uses tbl(7) macros, which need extra preprocessing.
> pkg_create(1) doesn't do any preprocessing... although that's easy
> enough to fix. (Anyone have an idea of how many USE_GROFF manuals use
> troff preprocessors? Is it worth it?)
> 
> USE_GROFF could also be removed from lftp. It's got some spacing and
> line wrapping issues in mandoc though.
> 
> Index: OpenBSD/PackingElement.pm
> ===
> RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/PackingElement.pm,v
> retrieving revision 1.244
> diff -u -p -r1.244 PackingElement.pm
> --- OpenBSD/PackingElement.pm 25 Jun 2016 18:02:59 -  1.244
> +++ OpenBSD/PackingElement.pm 13 Sep 2016 09:22:17 -
> @@ -655,7 +655,7 @@ sub format
>   chdir($dir) or die "Can't chdir to $dir";
>   },
>   OpenBSD::Paths->groff,
> - qw(-mandoc -mtty-char -E -Ww -Tascii -P -c),
> + qw(-mandoc -mtty-char -E -Ww -Tascii -t -P -c),
>   @extra, '--', $file);
>   } else {
>   die "Can't parse source name $fname";

Nope, wrong location. See how @extra is defined.   lftp manpage is bogus.
It should have the preprocessing letters in a comment.



Re: lftp man page broken

2016-09-13 Thread Ingo Schwarze
Hi Anthony,

Anthony J. Bentley wrote on Tue, Sep 13, 2016 at 03:32:05AM -0600:

> Jiri B writes:

>> lftp man pages is odd, see section for 'mirror' command.

> The lftp(1) manual uses tbl(7) macros, which need extra preprocessing.
> pkg_create(1) doesn't do any preprocessing... although that's easy
> enough to fix. (Anyone have an idea of how many USE_GROFF manuals use
> troff preprocessors? Is it worth it?)

I wouldn't oppose adding the comment requesting tbl(1) to the manual
as suggested by espie@, but if we switch to mandoc, it is not needed,
so handle that as you like.

> USE_GROFF could also be removed from lftp. It's got some spacing and
> line wrapping issues in mandoc though.

Those are trivial and don't require USE_GROFF.  Arguably, the wrapping
groff does is almost as ugly (considering the very narrow right column)
as the overlong lines produced by mandoc.  I think if people want a
really readable version of the manual, they should get an xterm(1)
132 columns wide and run "man -O width=130 lftp", which works fine
if we remove USE_GROFF.  Even without the -O option, just dragging
the xterm(1) window a bit wider helps readability with mandoc.

So please simply commit the following patch.  Bumping makes sense to
me because it makes the manuals more readable.  Besides, maybe we should
start forgetting about the old special rule "dropping USE_GROFF only
requires no bump":  It was useful in the past to prevent excessive
bumping, but mass deletions no longer happen nowadays, and those that
still happen usually happen for a specific reason, which often makes
pushing them to users useful enough to warrant a bump.

Yours,
  Ingo

P.S.
I also added two low-priority entries to the mandoc TODO list.


Index: Makefile
===
RCS file: /cvs/ports/net/lftp/Makefile,v
retrieving revision 1.110
diff -u -p -r1.110 Makefile
--- Makefile7 Aug 2016 21:40:20 -   1.110
+++ Makefile13 Sep 2016 11:53:37 -
@@ -3,6 +3,7 @@
 COMMENT=   shell-like command line ftp and sftp client
 
 DISTNAME=  lftp-4.7.3
+REVISION=  0
 CATEGORIES=net
 
 HOMEPAGE=  https://lftp.yar.ru/
@@ -14,8 +15,6 @@ PERMIT_PACKAGE_CDROM= Yes
 
 WANTLIB += c crypto curses ereadline expat iconv idn intl m ssl
 WANTLIB += stdc++ util z
-
-USE_GROFF= Yes
 
 # lftp needs add_history_time()
 LIB_DEPENDS=   devel/libidn \



Re: lftp man page broken

2016-09-13 Thread Stuart Henderson
On 2016/09/13 14:15, Ingo Schwarze wrote:
> So please simply commit the following patch.  Bumping makes sense to
> me because it makes the manuals more readable.  Besides, maybe we should
> start forgetting about the old special rule "dropping USE_GROFF only
> requires no bump":  It was useful in the past to prevent excessive
> bumping, but mass deletions no longer happen nowadays, and those that
> still happen usually happen for a specific reason, which often makes
> pushing them to users useful enough to warrant a bump.

I switched it to USE_GROFF previously because there was data loss in a
previous version, but this has gone away in the meantime (unsure whether
it was due to changes in mandoc or in the upstream page), so at this
point, it's OK with me.

I agree with bumping REVISION.



Re: lftp man page broken

2016-09-13 Thread Rafael Sadowski
On Tue Sep 13, 2016 at 02:15:12PM +0200, Ingo Schwarze wrote:
> Hi Anthony,
> 
> Anthony J. Bentley wrote on Tue, Sep 13, 2016 at 03:32:05AM -0600:
> 
> > Jiri B writes:
> 
> >> lftp man pages is odd, see section for 'mirror' command.
> 
> > The lftp(1) manual uses tbl(7) macros, which need extra preprocessing.
> > pkg_create(1) doesn't do any preprocessing... although that's easy
> > enough to fix. (Anyone have an idea of how many USE_GROFF manuals use
> > troff preprocessors? Is it worth it?)
> 
> I wouldn't oppose adding the comment requesting tbl(1) to the manual
> as suggested by espie@, but if we switch to mandoc, it is not needed,
> so handle that as you like.
> 
> > USE_GROFF could also be removed from lftp. It's got some spacing and
> > line wrapping issues in mandoc though.
> 
> Those are trivial and don't require USE_GROFF.  Arguably, the wrapping
> groff does is almost as ugly (considering the very narrow right column)
> as the overlong lines produced by mandoc.  I think if people want a
> really readable version of the manual, they should get an xterm(1)
> 132 columns wide and run "man -O width=130 lftp", which works fine
> if we remove USE_GROFF.  Even without the -O option, just dragging
> the xterm(1) window a bit wider helps readability with mandoc.
> 
> So please simply commit the following patch.  Bumping makes sense to
> me because it makes the manuals more readable.  Besides, maybe we should
> start forgetting about the old special rule "dropping USE_GROFF only
> requires no bump":  It was useful in the past to prevent excessive
> bumping, but mass deletions no longer happen nowadays, and those that
> still happen usually happen for a specific reason, which often makes
> pushing them to users useful enough to warrant a bump.
> 
> Yours,
>   Ingo
> 
> P.S.
> I also added two low-priority entries to the mandoc TODO list.
> 

I know of no Jiri B's "/usr/local/man/cat1/lftp.0"! man(1) shows me:

$ man -w lftp
/usr/local/man/man1/lftp.1

Ingo's patch works for me and the man page looks OK. Ingo is the
mna(1) master, so I'm OK with the patch.

Kind regards,

Rafael



Re: lftp man page broken

2016-09-13 Thread Jiri B
On Tue, Sep 13, 2016 at 11:25:56PM +0200, Rafael Sadowski wrote:
> I know of no Jiri B's "/usr/local/man/cat1/lftp.0"! man(1) shows me:
> 
> $ man -w lftp
> /usr/local/man/man1/lftp.1

I have no idea why this differs:

$ pkg_info -L lftp | grep man
/usr/local/man/cat1/lftp.0
/usr/local/man/cat1/lftpget.0
/usr/local/man/cat5/lftp.conf.0

jirib:/home/jirib
$ grep man cvs/openbsd-ports/net/lftp/pkg/PLIST
@man man/man1/lftp.1
@man man/man1/lftpget.1
@man man/man5/lftp.conf.5

$ pkg_info lftp | head -n1
Information for inst:lftp-4.7.3

j.



Re: lftp man page broken

2016-09-13 Thread Rafael Sadowski
On Tue Sep 13, 2016 at 05:49:35PM -0400, Jiri B wrote:
> On Tue, Sep 13, 2016 at 11:25:56PM +0200, Rafael Sadowski wrote:
> > I know of no Jiri B's "/usr/local/man/cat1/lftp.0"! man(1) shows me:
> > 
> > $ man -w lftp
> > /usr/local/man/man1/lftp.1
> 
> I have no idea why this differs:
> 
> $ pkg_info -L lftp | grep man
> /usr/local/man/cat1/lftp.0
> /usr/local/man/cat1/lftpget.0
> /usr/local/man/cat5/lftp.conf.0

Your man pages are from lftp 4.1.2.

Added (version 1.24, 2011/01/04 10:32:39)

http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/lftp/pkg/PLIST.diff?r1=1.23&r2=1.24&f=h

and removed (version 1.25, 2011/05/04 00:59:30) lftp 4.2.3

http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/lftp/pkg/PLIST.diff?r1=1.24&r2=1.25&f=h



Re: lftp man page broken

2016-09-13 Thread Ingo Schwarze
Hi,

Jiri B wrote on Tue, Sep 13, 2016 at 05:49:35PM -0400:
> On Tue, Sep 13, 2016 at 11:25:56PM +0200, Rafael Sadowski wrote:

>> $ man -w lftp
>> /usr/local/man/man1/lftp.1

> I have no idea why this differs:
> 
> $ pkg_info -L lftp | grep man
> /usr/local/man/cat1/lftp.0
> /usr/local/man/cat1/lftpget.0
> /usr/local/man/cat5/lftp.conf.0
> 
> jirib:/home/jirib
> $ grep man cvs/openbsd-ports/net/lftp/pkg/PLIST
> @man man/man1/lftp.1
> @man man/man1/lftpget.1
> @man man/man5/lftp.conf.5

Any sufficiently espied technology is indistinguishable from magic.

http://man.openbsd.org/bsd.port.mk

look for USE_GROFF

documentation is terse, so RTFS:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm?rev=HEAD

look at package OpenBSD::PackingElement::Manpage, makesum_plist()

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/pkg_add/OpenBSD/PackingElement.pm?rev=HEAD

look at source_to_dest() and format()

Yours,
  Ingo