Bug 272995 - dns/bind-tools: fails to build with MANPAGES=off if sphinx is installed
Summary: dns/bind-tools: fails to build with MANPAGES=off if sphinx is installed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Koichiro Iwao
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-07 10:47 UTC by Michael Osipov
Modified: 2023-09-15 05:17 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (mat)


Attachments
Git-formatted patch (1.05 KB, patch)
2023-08-14 09:17 UTC, Michael Osipov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov 2023-08-07 10:47:55 UTC
9.18.16 fails for me to build when MANPAGES and DOCS are disabled:
==============================
/usr/bin/make  all-am
Making all in man
echo ""

/usr/local/bin/sphinx-build -b man -d ./_build/.doctrees/man -W                  -c .                   -a                               -n                      -D version="@""PACKAGE_VERSION@"        -D today="@""RELEASE_DATE@"             -D release="@""PACKAGE_VERSION@"        -D rst_epilog="$(printf "${man_RST_EPILOG}")"                                   . ./_build/man
Running Sphinx v5.3.0
making output directory... done
building [mo]: all of 0 po files
building [man]: all source files
updating environment: [new config] 34 added, 0 changed, 0 removed
reading sources... [100%] tsig-keygen

Warning, treated as error:
../../bin/delv/delv.rst:105:Undefined substitution referenced: "bind_keys".
*** Error code 2

Stop.
make[5]: stopped in /usr/ports/dns/bind-tools/work/bind-9.18.16/doc/man
==============================

By reading Bug 270286 and https://gitlab.isc.org/isc-projects/bind9/-/issues/3681#note_359741 the problem is that sphinx is implicitly found (installed by other means) and used, but the Makefile processing requires gmake, BSD make fails here. Read also how Restructured Text substitutions work and they are passed through the Makefile.

I see two ways to solve this problem:
(a) always say: USES=gmake
(b) apply the following patch for 9.18.14+:
==============
diff --git a/dns/bind918/Makefile b/dns/bind918/Makefile
index 5410e2297e31..92cd005bf74f 100644
--- a/dns/bind918/Makefile
+++ b/dns/bind918/Makefile
@@ -179,0 +180,4 @@ BUILD_DEPENDS+=     cmocka>0:sysutils/cmocka
+.if !${PORT_OPTIONS:MMANPAGES} && !${PORT_OPTIONS:MDOCS}
+CONFIGURE_ENV+=        ac_cv_path_SPHINX_BUILD=
+.endif
+
==============
which basically reverts https://cgit.freebsd.org/ports/commit/?id=0612249ceafda613efff5c03ab08cb4023fe4836 except for the value.
Comment 1 Michael Osipov 2023-08-10 06:46:45 UTC
I can provide a ptch for both approaches. Maintainer, which approach do you prefer?
Comment 2 Michael Osipov 2023-08-14 09:17:23 UTC
Created attachment 244091 [details]
Git-formatted patch

Here is a patch for the issue.
Comment 3 Koichiro Iwao freebsd_committer freebsd_triage 2023-09-06 09:36:01 UTC
mat, can you have a look at submitter's patch?
Comment 4 Michael Osipov 2023-09-14 08:22:21 UTC
This should be available until the next quarterly branch.
Comment 5 Koichiro Iwao freebsd_committer freebsd_triage 2023-09-14 13:25:08 UTC
Take due to maintainer timeout.
Comment 6 Koichiro Iwao freebsd_committer freebsd_triage 2023-09-15 02:09:43 UTC
I don't think PORTREVISION bump is required in this case.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-09-15 02:12:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f00fe30e33ff2490e7e985067cc28f8eaeb24550

commit f00fe30e33ff2490e7e985067cc28f8eaeb24550
Author:     Michael Osipov <michael.osipov@siemens.com>
AuthorDate: 2023-08-14 09:16:01 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2023-09-15 02:11:01 +0000

    dns/bind918: fails to build with MANPAGES=off if sphinx is installed

    PR:             272995
    Approved by:    maintainer timeout (mat)
    Reviewed by:    meta

 dns/bind918/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Comment 8 Koichiro Iwao freebsd_committer freebsd_triage 2023-09-15 03:09:07 UTC
Committed, thanks!
Comment 9 Michael Osipov 2023-09-15 05:17:27 UTC
(In reply to Koichiro Iwao from comment #8)

Awesome, thanks!