cschwan / sage-on-gentoo

(Unofficial) Gentoo Overlay for Sage- and Sage-related ebuilds
78 stars 26 forks source link

sage-doc-9999 patch file issue. #769

Closed CaptainBloodz closed 7 months ago

CaptainBloodz commented 7 months ago

diff -Naur sage-doc-10.1-makefile.ori.patch sage-doc-10.1-makefile.new.patch --- sage-doc-10.1-makefile.ori.patch 2023-05-24 16:07:06.962543860 +0300 +++ sage-doc-10.1-makefile.new.patch 2023-11-30 04:33:50.869998837 +0300 @@ -40,7 +40,7 @@ $(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-pdf--reference_top

other documentation, pdf

--doc-pdf-other: doc-html-reference +-doc-pdf-other: doc-pdf-reference +doc-pdf-other: $(eval DOCS = $(shell sage --docbuild --all-documents all)) @if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi

This is at latest hunk.

kiwifb commented 7 months ago

Thanks for noticing. I missed this in rc4.

kiwifb commented 7 months ago

Patching issue fixed by 16b3d131f57a8b05fcca48e2a0b7fb4b55a85adf hopefully build not broken. Testing.

CaptainBloodz commented 7 months ago

It broke at first try... Let me clarify how:

It so happened initial L10n=fr wasn't taken into account, as far as final set of installed files is concerned, i.e. no /fr/ directory.

sci-mathematics:sage-9999:20231129-214852.log.gz

L10n=fr got taken into account when rebuilding the newly patched version which lead to an issue while referencing a french url.

sci-mathematics:sage-doc-9999:20231130-083348.log.gz

Currently trying to rebuild newly patched version with L10n=""

CaptainBloodz commented 7 months ago

This latest rebuild attempt also failed: sci-mathematics:sage-doc-9999:20231130-140637.log.gz

In order to check tool stack validity, currently trying to rebuild with my original version of a patch.

CaptainBloodz commented 7 months ago

It so happened initial L10n=fr wasn't taken into account, as far as final set of installed files is concerned, i.e. no /fr/ directory.

Wrong assumption: amd64 ~ # equery -f sage-doc | grep \/fr\/ /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/_images /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/_images/eigen_plot.png /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/_images/sin_plot.png /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/_sources /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/_sources/index.rst.txt /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/_static /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/genindex-all.html /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/genindex.html /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/index.html /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/objects.inv /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/search.html /usr/share/doc/sage-doc-9999/html/fr/a_tour_of_sage/searchindex.js /usr/share/doc/sage-doc-9999/html/fr/tutorial /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/afterword.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/appendix.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/bibliography.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/index.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/interactive_shell.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/interfaces.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/introduction.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/latex.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/programming.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/sagetex.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_advanced.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_algebra.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_assignment.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_coercion.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_functions.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_groups.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_help.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_linalg.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_numtheory.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_plotting.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_polynomial.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_sources/tour_rings.rst.txt /usr/share/doc/sage-doc-9999/html/fr/tutorial/_static /usr/share/doc/sage-doc-9999/html/fr/tutorial/afterword.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/appendix.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/bibliography.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/genindex-E.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/genindex-V.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/genindex-all.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/genindex.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/index.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/interactive_shell.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/interfaces.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/introduction.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/latex.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/objects.inv /usr/share/doc/sage-doc-9999/html/fr/tutorial/programming.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/sagetex.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/search.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/searchindex.js /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_advanced.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_algebra.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_assignment.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_coercion.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_functions.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_groups.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_help.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_linalg.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_numtheory.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_plotting.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_polynomial.html /usr/share/doc/sage-doc-9999/html/fr/tutorial/tour_rings.html /usr/share/doc/sage-doc-9999/pdf/fr/a_tour_of_sage /usr/share/doc/sage-doc-9999/pdf/fr/a_tour_of_sage/a_tour_of_sage.pdf /usr/share/doc/sage-doc-9999/pdf/fr/tutorial /usr/share/doc/sage-doc-9999/pdf/fr/tutorial/tutorial-fr.pdf

Sorry

CaptainBloodz commented 7 months ago

Tool stack testing failed here:

2023-11-30T00:26:49 >>> dev-python/cython-3.0.5 2023-11-30T00:28:29 >>> dev-python/cysignals-1.11.4 2023-11-30T00:29:00 >>> dev-python/cypari2-2.1.4-r1 2023-11-30T00:32:27 >>> sci-mathematics/sage_setup-9999 2023-11-30T00:44:12 >>> dev-python/fpylll-0.6.0-r1 2023-11-30T00:45:18 >>> sci-mathematics/sage-conf-9999 2023-11-30T00:47:08 >>> sci-mathematics/sage_docbuild-9999 2023-11-30T00:48:52 >>> sci-mathematics/sage-9999 2023-11-30T04:38:06 >>> sci-mathematics/sage-doc-9999 <<<<<<<<<<<<<<<<<<<<<<<<<< 2023-11-30T06:16:04 >>> dev-python/meson-python-0.15.0 2023-11-30T06:16:24 >>> dev-python/numpy-1.26.2 2023-11-30T06:19:58 >>> dev-python/pplpy-0.8.9 2023-11-30T06:21:16 >>> dev-cpp/rapidfuzz-cpp-2.2.3 2023-11-30T06:21:31 >>> dev-python/rapidfuzz-3.5.2 2023-11-30T06:31:45 >>> dev-python/msgpack-1.0.7 2023-11-30T06:32:21 >>> dev-python/flask-login-0.6.3 2023-11-30T06:32:36 >>> dev-python/Levenshtein-0.23.0 2023-11-30T08:15:57 >>> dev-libs/mathjax-3.2.2-r1 2023-11-30T15:50:53 >>> media-video/pipewire-9999 2023-11-30T15:57:00 >>> www-client/firefox-bin-120.0.1 2023-11-30T15:57:48 >>> dev-python/flask-gravatar-0.5.0-r2 2023-11-30T15:58:15 >>> app-emacs/marginalia-20231130.214 2023-11-30T15:58:39 >>> app-emacs/embark-20231129.1548

My 2 cents is that post sage-doc emerge world installs borked tool stack somehow.

Currently testing sci-mathematics/sage rebuild.

kiwifb commented 7 months ago

It broke at first try... Let me clarify how:

It so happened initial L10n=fr wasn't taken into account, as far as final set of installed files is concerned, i.e. no /fr/ directory.

sci-mathematics:sage-9999:20231129-214852.log.gz

L10n=fr got taken into account when rebuilding the newly patched version which lead to an issue while referencing a french url.

sci-mathematics:sage-doc-9999:20231130-083348.log.gz

Currently trying to rebuild newly patched version with L10n=""

Answering at this level and then I'll see if I should also answer the other posts. I also build with L10N=fr - I am french after all. There are no specific french files in "sage" only in "sage-doc".- Why the building of sage-doc has failed is interesting and should be attended to:

[reference] intersphinx inventory 'https://www.labri.fr/perso/vdelecro/pplpy/latest/objects.inv' not fetchable due to <class 'requests.exceptions.ConnectionError'>: HTTPSConnectionPool(host='www.labri.fr', port=443): Max retries exceeded with url: /perso/vdelecro/pplpy/latest/objects.inv (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x77a2f26fdd10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

The build process tries to fetch something from the internet rather than only using already downloaded files which is frowned upon. And as you can see from this message, there is a complain that the connexion failed. I am not sure why it did fail though. I'll check if there is something to address this in recent upstream commits.

kiwifb commented 7 months ago

I think that file is only looked for on the internet if it cannot be found locally, and it should be shipped with pplpy[doc].

kiwifb commented 7 months ago

What do you call "tool stack"? And what does it means that is it failing?

CaptainBloodz commented 7 months ago

I think that file is only looked for on the internet if it cannot be found locally, and it should be shipped with pplpy[doc].

eix pplpy [I] dev-python/pplpy Available versions: (~)0.8.7-r1(0/0.8.7-r1)[1] (~)0.8.9(0/0.8.9)[1] 0.8.9(0/0.8.9) {debug doc PYTHON_TARGETS="python3_10 python3_11 python3_12"} Installed versions: 0.8.9(0/0.8.9)(06:21:03 30/11/2023)(doc -debug PYTHON_TARGETS="python3_11 -python3_10")

CaptainBloodz commented 7 months ago

It broke at first try... Let me clarify how: It so happened initial L10n=fr wasn't taken into account, as far as final set of installed files is concerned, i.e. no /fr/ directory. sci-mathematics:sage-9999:20231129-214852.log.gz L10n=fr got taken into account when rebuilding the newly patched version which lead to an issue while referencing a french url. sci-mathematics:sage-doc-9999:20231130-083348.log.gz Currently trying to rebuild newly patched version with L10n=""

Answering at this level and then I'll see if I should also answer the other posts. I also build with L10N=fr - I am french after all. There are no specific french files in "sage" only in "sage-doc".- Why the building of sage-doc has failed is interesting and should be attended to:

�[91m[reference]�[39;49;00m intersphinx inventory 'https://www.labri.fr/perso/vdelecro/pplpy/latest/objects.inv' not fetchable due to <class 'requests.exceptions.ConnectionError'>: HTTPSConnectionPool(host='www.labri.fr', port=443): Max retries exceeded with url: /perso/vdelecro/pplpy/latest/objects.inv (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x77a2f26fdd10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))�[39;49;00m

The build process tries to fetch something from the internet rather than only using already downloaded files which is frowned upon. And as you can see from this message, there is a complain that the connexion failed. I am not sure why it did fail though. I'll check if there is something to address this in recent upstream commits.

I've noticed that too, firefox can access this url though. IIRC, there a net-sanbox portage FEATURES activated here. Investigating...

CaptainBloodz commented 7 months ago

"FEATURES=-network-sandbox" Rebuilding... So far so good... With current log file size beyond the broken ones. Other use case link with indication how to fix within ebuild.

kiwifb commented 7 months ago

I see. I will still look at the source to see if I can remove the need for it. If network-sandbox is the default, why has no one else complained before?

kiwifb commented 7 months ago

So this is where things go wrong https://github.com/sagemath/sage/blob/b2813506039143e6f0abe859ab67a343abf72c2e/src/sage_docbuild/conf.py#L276 Why does it go wrong with you? Is sage-conf properly installed? And in sage-conf is PPLPY_DOCS set to something sensible and does ${PPLPY_DOCS}/objects.inv exist?

kiwifb commented 7 months ago

PPLPY_DOCS should be properly defined in /usr/lib/python3.11/site-packages/_sage_conf/_conf.py and here it is

PPLPY_DOCS   = "/usr/share/doc/pplpy-0.8.9/html"

and

$ ll /usr/share/doc/pplpy-0.8.9/html/objects.inv
-rw-r--r-- 1 root root 257 Oct 21 10:58 /usr/share/doc/pplpy-0.8.9/html/objects.inv
CaptainBloodz commented 7 months ago

I see. I will still look at the source to see if I can remove the need for it. If network-sandbox is the default, why has no one else complained before?

Builded fine with -network-sandbox: sci-mathematics:sage-doc-9999:20231201-194746.log.gz Checking in the builded log there is no labri.fr, but references groups . google . fr

Since this occured after rc5 release, I've checked rebuilding without it, which just failed the same way: sci-mathematics:sage-doc-9999:20231201-214133.log.gz

Unsure if network-sandbox is activated by default. But it is activated here as a security measure.

I know there a file in portage tree that defines FEATURES defaults list, can't recall its location.

CaptainBloodz commented 7 months ago

PPLPY_DOCS should be properly defined in /usr/lib/python3.11/site-packages/_sage_conf/_conf.py and here it is

PPLPY_DOCS   = "/usr/share/doc/pplpy-0.8.9/html"

and

$ ll /usr/share/doc/pplpy-0.8.9/html/objects.inv
-rw-r--r-- 1 root root 257 Oct 21 10:58 /usr/share/doc/pplpy-0.8.9/html/objects.inv

`cat /usr/lib/python3.11/site-packages/_sage_conf/_conf.py r""" Sage variables definitions for Gentoo """ VERSION = "10.2.rc5"

SAGE_SHARE = "/usr/share/sage" SAGE_DOC = "/usr/share/doc/sage-doc-9999"

GAP_LIB_DIR = "/usr/lib64/gap" GAP_SHARE_DIR= "/usr/share/gap" THEBE_DIR = "/usr/share/thebe" JMOL_DIR = "/usr/share/sage-jmol-bin/lib" MATHJAX_DIR = "/usr/share/mathjax" MTXLIB = "/usr/share/meataxe" SINGULARPATH = "/usr/share/singular" PPLPY_DOCS = "/usr/share/doc/pplpy-0.8.9/html" THREEJS_DIR = "/usr/share/sage/threejs"

LIE_INFO_DIR = "/usr/share/lie"

MAXIMA = "maxima -l ecl"

Names or paths of the 4ti2 executables

FOURTITWO_HILBERT = "hilbert" `

ll /usr/share/doc/pplpy-0.8.9/html/objects.inv -rw-r--r-- 1 root root 1449 nov. 30 06:21 /usr/share/doc/pplpy-0.8.9/html/objects.inv

CaptainBloodz commented 7 months ago

I know there a file in portage tree that defines FEATURES defaults list, can't recall its location.

`cat /usr/share/portage/config/make.globals ...

Default user options

FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" ...`

CaptainBloodz commented 7 months ago

I'm puzzled.... I did FEATURES=-network-sandbox emerge sage-doc against rc5 before updating the whole suite.

I'm currently rebuilding sage-doc without FEATURES=-network-sandbox after having updated the rest of the sage stack against rc5. Which is currently building fine.

So I feel a little confused if not ashamed as rc5 seems to build fine as a whole. I let you decide whether to close or not.

Thks 4 ur attention, interest & support.

kiwifb commented 7 months ago

Well I was not able to reproduce the issue. But that's OK, that brought my attention to a few non fatal issues with the ebuild that I have now fixed.