Bug 235701 - security/py-certbot: Add man page
Summary: security/py-certbot: Add man page
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-python mailing list
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-02-12 16:19 UTC by freebsd
Modified: 2020-01-29 16:03 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback+
koobs: merge-quarterly?


Attachments
svn-diff-manpage (1.93 KB, patch)
2019-02-13 06:44 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-manpage_v2 (1.98 KB, patch)
2019-02-13 07:17 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-manpage_v3 (2.00 KB, patch)
2019-02-13 08:29 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-alternate (2.24 KB, patch)
2019-02-13 14:36 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-manpage_v4 (1.46 KB, patch)
2019-02-13 15:51 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-manpage_v5 (1.49 KB, patch)
2019-02-13 16:00 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-manpage_v6 (1.49 KB, patch)
2019-02-13 17:03 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-manpage_v7 (1.34 KB, patch)
2019-02-13 17:27 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-manpage_v8 (1.27 KB, patch)
2019-02-13 18:51 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-dff-manpage_v9 (1.34 KB, patch)
2019-02-13 22:22 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-py-certbot_new (1.61 KB, patch)
2020-01-28 18:24 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-py-certbot_new2 (1.58 KB, patch)
2020-01-29 00:27 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-py-certbot_new2 (1.58 KB, patch)
2020-01-29 00:29 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-py-certbot_new3 (1.65 KB, patch)
2020-01-29 12:48 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-py-certbot_new4 (1.65 KB, patch)
2020-01-29 15:30 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-without-gsed (1.68 KB, patch)
2020-01-29 15:56 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-without-gsed_v2 (1.69 KB, patch)
2020-01-29 16:03 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd 2019-02-12 16:19:47 UTC
py27-certbot has no man page

11.2-RELEASE-p9 FreeBSD 11.2-RELEASE-p9 #0: Tue Feb  5 15:30:36 UTC 2019     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
Comment 1 Walter Schwarzenfeld freebsd_triage 2019-02-12 17:17:02 UTC
Try certbot-2.7 --help.
Comment 2 Walter Schwarzenfeld freebsd_triage 2019-02-12 17:35:00 UTC
...and the manpage is the same as the helptext.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2019-02-13 01:47:31 UTC
docs/Makefile contains a man: target that uses sphinx to convert docs/man* into man pages. While the contents is the same as the command line help, its desirable and preferable that ports install man pages if they are (or can be) provided.
Comment 4 Walter Schwarzenfeld freebsd_triage 2019-02-13 06:44:51 UTC
Created attachment 201975 [details]
svn-diff-manpage

sphinx has warnings.

man 7 certbot has a syntax error:

      free, so thereas no need to arrange payment.

:<standard input>:562: `\&' is not allowed in a name
grotty:<standard input> (<standard input>):11450: character above first line discarded
grotty:<standard input> (<standard input>):11454: character above first line discarded
grotty:<standard input> (<standard input>):11458: character above first line discarded
grotty:<standard input> (<standard input>):11462: character above first line discarded
grotty:<standard input> (<standard input>):11466: character above first line discarded
       How you use Certbot depends on the configuration of  your  web  server.
       The  best way to get started is to use our interactive guide. It gener-
Comment 5 Walter Schwarzenfeld freebsd_triage 2019-02-13 07:17:40 UTC
Created attachment 201976 [details]
svn-diff-manpage_v2

PORT_OPTIONS:MMAN was not right.
Comment 6 Walter Schwarzenfeld freebsd_triage 2019-02-13 08:29:45 UTC
Created attachment 201978 [details]
svn-diff-manpage_v3

Forgot FLAVOR for sphinx.
Comment 7 Walter Schwarzenfeld freebsd_triage 2019-02-13 14:36:19 UTC
Created attachment 201984 [details]
svn-diff-alternate

Alternate patch fixes output cetbot.7.
Comment 8 Tobias Kortkamp freebsd_committer 2019-02-13 15:11:19 UTC
Comment on attachment 201984 [details]
svn-diff-alternate

1. MAN should be named MANPAGES as it usually is.

2. The new options and helpers are badly ordered [1].

3. Remove .include <bsd.port.options.mk> again and use options helpers
   targets.

4. This should probably be post-build-MAN-on (or post-build-MANPAGES-on after fixing the option name):
+pre-install:

5. gmake is not declared as a build dependency, so this will probably fail:
+	${LOCALBASE}/bin/gmake -C ${WRKSRC}/docs man

6. Use the INSTALL_MAN macro to install files into STAGEDIR, not CP. [2]

7. What does this do and why does it require gsed?
+	${SED_CMD} -i '1i\.if n .pl 2000v' ${STAGEDIR}${PREFIX}/man/man7/certbot.7

   If the input for creating certbot.7 is already broken can it not
   be fixed instead?

8. Why is patch-docs_conf.py needed?

[1] https://www.freebsd.org/doc/en/books/porters-handbook/porting-order.html
[2] https://www.freebsd.org/doc/en/books/porters-handbook/install.html
Comment 9 Tobias Kortkamp freebsd_committer 2019-02-13 15:20:45 UTC
(In reply to Tobias Kortkamp from comment #8)
> 5. gmake is not declared as a build dependency, so this will probably fail:

Ah, nevermind. I see now that there is MAN_USES=gmake. In which case

+	${LOCALBASE}/bin/gmake -C ${WRKSRC}/docs man

can be

+	${DO_MAKE_BUILD} -C ${WRKSRC}/docs man

to not ignore MAKE_{ARGS,ENV,FLAGS}, etc.
Comment 10 Walter Schwarzenfeld freebsd_triage 2019-02-13 15:38:31 UTC
(In reply to Tobias Kortkamp from comment #8)


>7. What does this do and why does it require gsed?
It does not work with "standard" sed.
Comment 11 Walter Schwarzenfeld freebsd_triage 2019-02-13 15:50:18 UTC
(In reply to Tobias Kortkamp from comment #8)

Why is patch-docs_conf.py needed?
Was a wrong idea, sphinx does not work with extension repoze.sphinx.autointerface.
I obolete this patch, and use BUILD_DEPENDS= ....devel/py-repoze.sphinx.autointerface
Comment 12 Walter Schwarzenfeld freebsd_triage 2019-02-13 15:51:51 UTC
Created attachment 201985 [details]
svn-diff-manpage_v4
Comment 13 Walter Schwarzenfeld freebsd_triage 2019-02-13 16:00:24 UTC
Created attachment 201986 [details]
svn-diff-manpage_v5

Forgot to change MAN to MANPAGES.
Comment 14 Walter Schwarzenfeld freebsd_triage 2019-02-13 17:03:36 UTC
Created attachment 201989 [details]
svn-diff-manpage_v6

Change targets.
Comment 15 Walter Schwarzenfeld freebsd_triage 2019-02-13 17:27:15 UTC
Created attachment 201990 [details]
svn-diff-manpage_v7

Sent the wrong svn diff.
Comment 16 Walter Schwarzenfeld freebsd_triage 2019-02-13 18:51:21 UTC
Created attachment 201992 [details]
svn-diff-manpage_v8

Remove PLIST_FILES cause of duplicate file listing.
Comment 17 Walter Schwarzenfeld freebsd_triage 2019-02-13 22:22:08 UTC
Created attachment 201997 [details]
svn-dff-manpage_v9

Revert last change and accept duplicate listing (seems autoplist makes nonsense).
Comment 18 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-28 00:53:20 UTC
(In reply to Walter Schwarzenfeld from comment #17)

Are the man pages correctly and completely handled by USE_PYTHON=concurrent to add version-specific suffixes?

Can we also try to remove the gmake/gsed dependencies and invocations by executing the sphinx commands directly?
Comment 19 Walter Schwarzenfeld freebsd_triage 2020-01-28 01:24:47 UTC
Comment on attachment 201997 [details]
svn-dff-manpage_v9

I obsolete the patch, there are other problems.
Comment 20 Walter Schwarzenfeld freebsd_triage 2020-01-28 17:37:09 UTC
Btw, I tried to install py27 and py37:

Installing py27-certbot-1.1.0,1...
pkg-static: py27-certbot-1.1.0,1 conflicts with py37-certbot-1.1.0,1 (installs files into the same place).  Problematic file: /usr/local/etc/periodic/weekly/500.certbot
*** Error code 70
Comment 21 Walter Schwarzenfeld freebsd_triage 2020-01-28 17:42:00 UTC
(In reply to Kubilay Kocak from comment #18)
> Can we also try to remove the gmake/gsed dependencies:

Not for gsed - certbot.7 is malformatted, does not handled by "normal" sed.
Comment 22 Walter Schwarzenfeld freebsd_triage 2020-01-28 18:02:17 UTC
(In reply to Walter Schwarzenfeld from comment #20)
Sorry, install of two different versions of py-certbot is nonsense.
Comment 23 Walter Schwarzenfeld freebsd_triage 2020-01-28 18:10:29 UTC
(In reply to Walter Schwarzenfeld from comment #21)
for gmake:
No, cause:
make[2]: "/ram/usr/home/ngorx/work/py-certbot/work-py37/certbot-1.1.0/docs/Makefile" line 11: Missing dependency operator
make[2]: Unknown modifier '/'
make[2]: "/ram/usr/home/ngorx/work/py-certbot/work-py37/certbot-1.1.0/docs/Makefile" line 12: Need an operator
make[2]: "/ram/usr/home/ngorx/work/py-certbot/work-py37/certbot-1.1.0/docs/Makefile" line 13: Need an operator
Comment 24 Walter Schwarzenfeld freebsd_triage 2020-01-28 18:24:50 UTC
Created attachment 211138 [details]
svn-diff-py-certbot_new

Last version. If its not right, I am give it up here.
Comment 25 Walter Schwarzenfeld freebsd_triage 2020-01-28 18:31:53 UTC
(In reply to Kubilay Kocak from comment #18)
> Are the man pages correctly and completely handled by USE_PYTHON=concurrent to add version-specific
> suffixes?

Move: share/man/man1/certbot.1 --> share/man/man1/certbot-3.7.1
Link: @share/man/man1/certbot.1 --> share/man/man1/certbot-3.7.1
Move: share/man/man7/certbot.7 --> share/man/man7/certbot-3.7.7
Link: @share/man/man7/certbot.7 --> share/man/man7/certbot-3.7.7
Comment 26 Walter Schwarzenfeld freebsd_triage 2020-01-29 00:27:32 UTC
Created attachment 211147 [details]
svn-diff-py-certbot_new2
Comment 27 Walter Schwarzenfeld freebsd_triage 2020-01-29 00:29:59 UTC
Created attachment 211148 [details]
svn-diff-py-certbot_new2
Comment 28 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-29 02:44:34 UTC
(In reply to Walter Schwarzenfeld from comment #22)

All files installed by a port that installs files in shared (non Python version specific) locations, must be made unique ("concurrent safe")

Could you please process the periodic script to include that concurrent treatment by using uniquefiles functionality [1]. You should just be able to add the file to UNIQUE_SUFFIX_FILES which are already set by ports using USE_PYTHON=concurrent (which uses uniquefiles.mk functionality)

[1] https://www.freebsd.org/doc/en/books/porters-handbook/book.html#uses-uniquefiles
Comment 29 Walter Schwarzenfeld freebsd_triage 2020-01-29 04:24:10 UTC
Is this what you mean?
u
post-install:
...
...
${MV} ${STAGEDIR}${PREFIX}/etc/periodic/weekly/500.certbot ${STAGEDIR}${PREFIX}/etc/periodic/weekly/500.certbot-${PYTHON_VER}
Comment 30 Walter Schwarzenfeld freebsd_triage 2020-01-29 04:42:23 UTC
${PYTHON_SUFFIX} instead of ${PYTHON_VER}.
Comment 31 Kubilay Kocak freebsd_committer freebsd_triage 2020-01-29 10:50:09 UTC
(In reply to Walter Schwarzenfeld from comment #29)

Yes, but adding (+=) the file to the existing UNIQUE_SUFFIX_FILES list will handle it automatically
Comment 32 Walter Schwarzenfeld freebsd_triage 2020-01-29 12:48:23 UTC
Created attachment 211161 [details]
svn-diff-py-certbot_new3
Comment 33 Walter Schwarzenfeld freebsd_triage 2020-01-29 15:30:33 UTC
Created attachment 211164 [details]
svn-diff-py-certbot_new4

...cause of portlint.
Comment 34 Walter Schwarzenfeld freebsd_triage 2020-01-29 15:56:58 UTC
Created attachment 211168 [details]
svn-diff-without-gsed

Found a way without gsed.
Comment 35 Walter Schwarzenfeld freebsd_triage 2020-01-29 16:03:48 UTC
Created attachment 211169 [details]
svn-diff-without-gsed_v2

Correct the commands mv and cat.