Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 730270 - net-dns/bind-tools should conditionally depend on dev-python/sphinx
Summary: net-dns/bind-tools should conditionally depend on dev-python/sphinx
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Christian Ruppert (idl0r)
: 733184 (view as bug list)
Depends on:
Reported: 2020-06-30 17:57 UTC by Grzegorz Kulewski
Modified: 2020-08-29 10:20 UTC (History)
10 users (show)

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

bind-tools-9.16.4.ebuild-no-sphinx.patch (bind-tools-9.16.4.ebuild-no-sphinx.patch,643 bytes, patch)
2020-07-12 17:09 UTC, Guillaume Castagnino
Details | Diff
bind-tools-9.16.4.ebuild-no-sphinx.patch (bind-tools-9.16.4.ebuild-no-sphinx.patch,642 bytes, patch)
2020-07-12 19:08 UTC, Guillaume Castagnino
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Kulewski 2020-06-30 17:57:00 UTC
Please stop all these from installing on small systems. Maybe doc use flag to enable man page generation if it requires deps is the answer? Or maybe new use flag like sphinx (better) or man (worse, tells less)?

# emerge -u --deep --newuse @world -pv

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-python/namespace-sphinxcontrib-1.0::gentoo  PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 0 KiB
[ebuild  N     ] dev-python/six-1.15.0::gentoo  USE="-doc -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 34 KiB
[ebuild  N     ] dev-python/pygments-2.6.1::gentoo  USE="-doc -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python3_6" 3226 KiB
[ebuild  N     ] dev-python/idna-2.10::gentoo  PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 172 KiB
[ebuild  N     ] dev-python/alabaster-0.7.12::gentoo  PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 11 KiB
[ebuild  N     ] dev-python/imagesize-1.1.0::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 1246 KiB
[ebuild  N     ] dev-python/snowballstemmer-2.0.0::gentoo  PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 78 KiB
[ebuild  N     ] dev-python/typed-ast-1.4.1::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -python3_6" 204 KiB
[ebuild  N     ] dev-python/pyparsing-2.4.7::gentoo  USE="-examples" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 633 KiB
[ebuild  N     ] dev-python/chardet-3.0.4::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 1829 KiB
[ebuild  N     ] dev-python/ply-3.11:0/3.11::gentoo  USE="-examples" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 156 KiB
[ebuild  N     ] dev-python/PySocks-1.7.1::gentoo  PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 278 KiB
[ebuild  N     ] dev-python/markupsafe-1.1.1::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 19 KiB
[ebuild  N     ] dev-python/pytz-2020.1::gentoo  PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 305 KiB
[ebuild  N     ] dev-python/Babel-2.8.0-r1::gentoo  USE="-doc -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 8247 KiB
[ebuild  N     ] dev-python/docutils-0.16::gentoo  PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 1917 KiB
[ebuild  N     ] dev-python/jinja-2.11.2::gentoo  USE="-doc -examples -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 253 KiB
[ebuild  N     ] dev-python/packaging-20.4::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 73 KiB
[ebuild  N     ] dev-python/pycparser-2.20::gentoo  PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 158 KiB
[ebuild  N     ] dev-python/cffi-1.14.0-r2:0/1.14.0::gentoo  USE="-doc -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -python2_7 -python3_6" 453 KiB
[ebuild  N     ] dev-python/cryptography-2.9::gentoo  USE="-idna -libressl -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 506 KiB
[ebuild  N     ] dev-python/pyopenssl-19.1.0::gentoo  USE="-doc -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 157 KiB
[ebuild  N     ] dev-python/urllib3-1.25.9::gentoo  USE="-brotli -doc -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 249 KiB
[ebuild  N     ] dev-python/requests-2.24.0::gentoo  USE="ssl -socks5 -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python2_7 -python3_6" 113 KiB
[ebuild  N     ] dev-python/sphinxcontrib-applehelp-1.0.2::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python3_6" 24 KiB
[ebuild  N     ] dev-python/sphinxcontrib-devhelp-1.0.2::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python3_6" 17 KiB
[ebuild  N     ] dev-python/sphinxcontrib-jsmath-1.0.1-r1::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python3_6" 6 KiB
[ebuild  N     ] dev-python/sphinxcontrib-htmlhelp-1.0.3::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python3_6" 24 KiB
[ebuild  N     ] dev-python/sphinxcontrib-serializinghtml-1.1.4::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python3_6" 19 KiB
[ebuild  N     ] dev-python/sphinxcontrib-qthelp-1.0.3::gentoo  USE="-test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python3_6" 22 KiB
[ebuild  N     ] dev-python/sphinx-3.1.1::gentoo  USE="-doc -latex -test" PYTHON_TARGETS="python3_7 python3_8 python3_9 -pypy3 -python3_6" 5794 KiB
[ebuild     U  ] net-dns/bind-tools-9.16.4::gentoo [9.16.3::gentoo] USE="caps idn ipv6 readline -doc -gssapi -libedit -libressl -xml" 0 KiB

Setting severity to major since current state forces admins of small systems to mask the package upgrade completely.

Reproducible: Always

Steps to Reproduce:
1. emerge -u --deep --newuse @world -pv
Actual Results:  
Insane amount of deps for man pages, especially for small VPS or router.

Expected Results:  
USE flag for pulling dev-python/sphinx and/or for prebuilt man pages(?).
Comment 1 Guillaume Castagnino 2020-06-30 19:14:12 UTC
Completely agreed. This is insane amount of dependencies just for some doc/man page.
The ebuild already has a doc use flag, this dependency should be hidden behind this flag too.
Comment 2 Ionen Wolkens gentoo-dev 2020-06-30 21:12:34 UTC
Normally man pages are always supposed to be installed, so the solution a few packages do in this situation (where things like sphinx, asciidoctor, etc... are needed just for this) is bundle man pages in a separate tarball and install those when USE=-doc

It is however extra maintenance work, but it would be much appreciated if bind-tools would go this route.
Comment 3 Guillaume Castagnino 2020-07-01 05:58:51 UTC
Well, after a quick look at the package the manpages are already prebuilt in the tarball (doc/man/*.[158]in). sphinx should not be needed.
When manually building man pages, this is correctly handled without sphinx :
# ./configure
# cd doc/man
# ls
arpaname.1in      delv.1in        dnssec-cds.rst       dnssec-dsfromkey.8in     dnssec-keyfromlabel.rst  dnssec-revoke.8in    dnssec-signzone.rst  filter-aaaa.8in  Makefile     named-checkconf.8in  named.conf.rst          named-rrchecker.1in  nslookup.1in        pkcs11-destroy.rst  pkcs11-tokens.8in  rndc-confgen.rst
arpaname.rst      delv.rst        dnssec-checkds.8in   dnssec-dsfromkey.rst     dnssec-keygen.8in        dnssec-revoke.rst    dnssec-verify.8in    filter-aaaa.rst  named-checkconf.rst  named-journalprint.8in  named-rrchecker.rst  nslookup.rst        pkcs11-keygen.8in   pkcs11-tokens.rst  rndc.conf.rst           dig.1in         dnssec-checkds.rst   dnssec-importkey.8in     dnssec-keygen.rst        dnssec-settime.8in   dnssec-verify.rst    host.1in         mdig.1in     named-checkzone.8in  named-journalprint.rst  named.rst            nsupdate.1in        pkcs11-keygen.rst   rndc.8in           rndc.rst
ddns-confgen.8in  dig.rst         dnssec-coverage.8in  dnssec-importkey.rst     dnssec-keymgr.8in        dnssec-settime.rst   dnstap-read.1in      host.rst         mdig.rst     named-checkzone.rst  named-nzd2nzf.8in       nsec3hash.8in        nsupdate.rst        pkcs11-list.8in     rndc.conf.5in
ddns-confgen.rst  dnssec-cds.8in  dnssec-coverage.rst  dnssec-keyfromlabel.8in  dnssec-keymgr.rst        dnssec-signzone.8in  dnstap-read.rst      index.rst        named.8in    named.conf.5in       named-nzd2nzf.rst       nsec3hash.rst        pkcs11-destroy.8in  pkcs11-list.rst     rndc-confgen.8in
# make
for man in arpaname.1in ddns-confgen.8in delv.1in dig.1in dnssec-cds.8in dnssec-checkds.8in dnssec-coverage.8in dnssec-dsfromkey.8in dnssec-importkey.8in dnssec-keyfromlabel.8in dnssec-keygen.8in dnssec-keymgr.8in dnssec-revoke.8in dnssec-settime.8in dnssec-signzone.8in dnssec-verify.8in dnstap-read.1in filter-aaaa.8in host.1in mdig.1in named-checkconf.8in named-checkzone.8in named-journalprint.8in named-nzd2nzf.8in named-rrchecker.1in named.conf.5in named.8in nsec3hash.8in nslookup.1in nsupdate.1in rndc-confgen.8in rndc.conf.5in rndc.8in pkcs11-destroy.8in pkcs11-keygen.8in pkcs11-list.8in pkcs11-tokens.8in; do \
  [ -e "$man" ] || cp -f ./"$man" .; \
for m in arpaname.1 delv.1 dig.1 dnstap-read.1 host.1 mdig.1 named-rrchecker.1 nslookup.1 nsupdate.1; do \
        sed -e 's,[@]BIND9_VERSION[@],9.16.4,' -e 's,[@]RELEASE_DATE[@],2020-06-10,' -e 's,[@]BIND9_VERSION_STRING[@],,' -e 's,[@]sysconfdir[@],/usr/local/etc,' -e 's,[@]plugindir[@],/usr/local/lib/named,' ${m}in > $m; \
for m in named.conf.5 rndc.conf.5; do \
        sed -e 's,[@]BIND9_VERSION[@],9.16.4,' -e 's,[@]RELEASE_DATE[@],2020-06-10,' -e 's,[@]BIND9_VERSION_STRING[@],,' -e 's,[@]sysconfdir[@],/usr/local/etc,' -e 's,[@]plugindir[@],/usr/local/lib/named,' ${m}in > $m; \
for m in ddns-confgen.8 dnssec-cds.8 dnssec-checkds.8 dnssec-coverage.8 dnssec-dsfromkey.8 dnssec-importkey.8 dnssec-keyfromlabel.8 dnssec-keygen.8 dnssec-keymgr.8 dnssec-revoke.8 dnssec-settime.8 dnssec-signzone.8 dnssec-verify.8 filter-aaaa.8 named-checkconf.8 named-checkzone.8 named-journalprint.8 named-nzd2nzf.8 named.8 nsec3hash.8 rndc-confgen.8 rndc.8; do \
        sed -e 's,[@]BIND9_VERSION[@],9.16.4,' -e 's,[@]RELEASE_DATE[@],2020-06-10,' -e 's,[@]BIND9_VERSION_STRING[@],,' -e 's,[@]sysconfdir[@],/usr/local/etc,' -e 's,[@]plugindir[@],/usr/local/lib/named,' ${m}in > $m; \
# ls
arpaname.1        delv.1        dnssec-cds.8in       dnssec-coverage.rst   dnssec-keyfromlabel.8    dnssec-keymgr.8in   dnssec-settime.rst   dnstap-read.1    host.1in     mdig.rst             named-checkzone.8in     named-journalprint.rst  named.rst      nsupdate.1          pkcs11-list.8in    rndc.conf.5in
arpaname.1in      delv.1in      dnssec-cds.rst       dnssec-dsfromkey.8    dnssec-keyfromlabel.8in  dnssec-keymgr.rst   dnssec-signzone.8    dnstap-read.1in  host.rst     named.8              named-checkzone.rst     named-nzd2nzf.8         nsec3hash.8    nsupdate.1in        pkcs11-list.rst    rndc-confgen.8
arpaname.rst      delv.rst      dnssec-checkds.8     dnssec-dsfromkey.8in  dnssec-keyfromlabel.rst  dnssec-revoke.8     dnssec-signzone.8in  dnstap-read.rst  index.rst    named.8in            named.conf.5            named-nzd2nzf.8in       nsec3hash.8in  nsupdate.rst        pkcs11-tokens.8in  rndc-confgen.8in           dig.1         dnssec-checkds.8in   dnssec-dsfromkey.rst  dnssec-keygen.8          dnssec-revoke.8in   dnssec-signzone.rst  filter-aaaa.8    Makefile     named-checkconf.8    named.conf.5in          named-nzd2nzf.rst       nsec3hash.rst  pkcs11-destroy.8in  pkcs11-tokens.rst  rndc-confgen.rst
ddns-confgen.8    dig.1in       dnssec-checkds.rst   dnssec-importkey.8    dnssec-keygen.8in        dnssec-revoke.rst   dnssec-verify.8      filter-aaaa.8in  named-checkconf.8in  named.conf.rst          named-rrchecker.1       nslookup.1     pkcs11-destroy.rst  rndc.8             rndc.conf.rst
ddns-confgen.8in  dig.rst       dnssec-coverage.8    dnssec-importkey.8in  dnssec-keygen.rst        dnssec-settime.8    dnssec-verify.8in    filter-aaaa.rst  mdig.1       named-checkconf.rst  named-journalprint.8    named-rrchecker.1in     nslookup.1in   pkcs11-keygen.8in   rndc.8in           rndc.rst
ddns-confgen.rst  dnssec-cds.8  dnssec-coverage.8in  dnssec-importkey.rst  dnssec-keymgr.8          dnssec-settime.8in  dnssec-verify.rst    host.1           mdig.1in     named-checkzone.8    named-journalprint.8in  named-rrchecker.rst     nslookup.rst   pkcs11-keygen.rst   rndc.conf.5
Comment 4 John Bowler 2020-07-01 16:15:55 UTC
Using delv.1 as an example delv.1in and delv.rst both exist in doc/man (after an ebuild prepare) and they have exactly the same date (the package date). contains this target for the manpages sphinx-build:


I.e. all the 'in' files depend on all the 'rst' files and, yes, they all have exactly the same date.

How reliable is this?  I remember from the 1980s that different versions of make (BSD vs System V) had different behaviors in this regard; one used <, the other <=.

A crude but safe patch would be to delete the entire $(MANPAGES_IN) target and rules from, a less crude patch would be to change the ootsetup target to touch the .?in files.
Comment 5 gdlr 2020-07-07 17:05:30 UTC
I agree. The sphinx dependency is unnecessary. It should be conditional on the doc flag. 

With the below change to the ebuild, I still get the man-pages.

--- /var/portage/net-dns/bind-tools/bind-tools-9.16.4.ebuild	2020-07-04 14:09:14.000000000 +0000
+++ bind-tools-9.16.4.ebuild	2020-07-07 17:01:51.172541152 +0000
@@ -38,7 +38,7 @@
 # sphinx required for man-page and html creation
-	dev-python/sphinx
+	doc? ( dev-python/sphinx )
Comment 6 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2020-07-12 15:41:43 UTC
No, this should remain as is. The doc use flag is for documentation, here we have man pages, which are essential.
Comment 7 A Blamey 2020-07-12 15:55:25 UTC
But according to comment #3 sphinx in NOT required to build the man pages ...
Comment 8 Grzegorz Kulewski 2020-07-12 15:56:24 UTC
This report is not INVALID because it's true. Please reopen and fix.

Essential are tools like: host, nslookup, dig, nsupdate and not sphinx and all this bloat.

From some comments (I didn't check myself) it seems you don't really need sphinx if you don't need to regenerate man pages from scratch since source package contains pregenerated files. You can always add man USE flag for those who want to recompile man pages. For some systems even no man pages is better than all this bloat.

Gentoo was supposed to be about choice, not about bloat.

Thank you in advance.
Comment 9 Guillaume Castagnino 2020-07-12 17:09:27 UTC
Created attachment 649014 [details, diff]

Patch to remove sphing dependancy. just add the touch to ensure that the prebuilt target is newer than source and avoid rebuild.
Comment 10 Guillaume Castagnino 2020-07-12 19:08:02 UTC
Created attachment 649022 [details, diff]

Sorry, typo in the previous one
Comment 11 Patrick McLean gentoo-dev 2020-07-20 17:08:29 UTC
(In reply to Mikle Kolyada from comment #6)
> No, this should remain as is. The doc use flag is for documentation, here we
> have man pages, which are essential.

Prebuilt man pages are included in the tarball, the sphinx dependency is not needed to install man pages.
Comment 12 Sam James archtester gentoo-dev Security 2020-07-20 17:46:26 UTC
*** Bug 733184 has been marked as a duplicate of this bug. ***
Comment 13 Sam James archtester gentoo-dev Security 2020-07-20 17:46:50 UTC
[Reopening to avoid duplicates.]
Comment 14 Grzegorz Kulewski 2020-07-20 18:09:54 UTC
Thank you. Hopefully this bug will be finally fixed.
Comment 15 Ionen Wolkens gentoo-dev 2020-07-20 22:59:25 UTC
It is(In reply to Grzegorz Kulewski from comment #14)
> Thank you. Hopefully this bug will be finally fixed.
It is, bind-tools-9.16.5 is back to normal and needs nothing special done, and bind-tools-9.16.4 has a tarball for man pages. Neither depend on sphinx anymore unless USE=doc.
Comment 16 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2020-08-29 10:20:39 UTC
Should not be a problem by now.