Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

man pages not available #63

Closed
MattF-NSIDC opened this issue May 18, 2023 · 10 comments · Fixed by #65
Closed

man pages not available #63

MattF-NSIDC opened this issue May 18, 2023 · 10 comments · Fixed by #65

Comments

@MattF-NSIDC
Copy link

In our workshop, we suggest e.g. man ogrinfo to get help for ogrinfo. On my laptop, I have that utility installed via conda and I do have a man page. On CryoCloud, the utility is installed the same way, but lacks a man page. I'm also seeing missing man pages for GNU coreutils:

(notebook) jovyan@jupyter-mattf-2dnsidc:~$ man ogrinfo
No manual entry for ogrinfo
See 'man 7 undocumented' for help when manual pages are not available.
(notebook) jovyan@jupyter-mattf-2dnsidc:~$ man find
No manual entry for find
See 'man 7 undocumented' for help when manual pages are not available.
(notebook) jovyan@jupyter-mattf-2dnsidc:~$ man  grep
No manual entry for grep
See 'man 7 undocumented' for help when manual pages are not available.
@MattF-NSIDC
Copy link
Author

I'm trying to use the Dockerfile escape hatch to work on a fix for this. I'm hoping I can use mandb to initialize the database cache. But I'm struggling with how to convert an existing repo2docker project to use a Dockerfile. I opened a PR for some doc changes, but after making some progress I'm having more issues (commented on the PR): jupyterhub/repo2docker#1271

@MattF-NSIDC
Copy link
Author

Forgot to mention, running mandb as non-root doesn't seem to be having any effect:

(notebook) jovyan@jupyter-mattf-2dnsidc:~/shared-readwrite/QGreenland$ mandb
\Processing manual pages under /srv/conda/envs/notebook/man...
Updating index cache for path `/srv/conda/envs/notebook/man/man3'. Wait...mandb: warning: /srv/conda/envs/notebook/man/man3/pcre2demo.3: whatis parse for pcre2demo(3) failed
Updating index cache for path `/srv/conda/envs/notebook/man/man7'. Wait...done.
Checking for stray cats under /srv/conda/envs/notebook/man...
Processing manual pages under /srv/conda/envs/notebook/man/cat1...
Processing manual pages under /srv/conda/envs/notebook/man/cat3...
Processing manual pages under /srv/conda/envs/notebook/man/cat5...
Processing manual pages under /srv/conda/envs/notebook/man/cat7...
Processing manual pages under /srv/conda/man...
Updating index cache for path `/srv/conda/man/man1'. Wait...done.
Checking for stray cats under /srv/conda/man...
Processing manual pages under /srv/conda/man/cat1...
5 man subdirectories contained newer manual pages.
1094 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
(notebook) jovyan@jupyter-mattf-2dnsidc:~/shared-readwrite/QGreenland$ man ogrinfo
No manual entry for ogrinfo
See 'man 7 undocumented' for help when manual pages are not available.
(notebook) jovyan@jupyter-mattf-2dnsidc:~/shared-readwrite/QGreenland$ man find
No manual entry for find
See 'man 7 undocumented' for help when manual pages are not available.

@MattF-NSIDC
Copy link
Author

@MattF-NSIDC
Copy link
Author

I think the --appendix argument could possibly solve this. Testing...

@MattF-NSIDC
Copy link
Author

USER root
RUN yes | unminimize

..in the appendix instructions is enabling man pages for apt-installed programs, but not conda-installed programs.

@MattF-NSIDC
Copy link
Author

RUN mandb didn't make man gdalinfo work :(

@MattF-NSIDC
Copy link
Author

conda remove gdal && conda install gdal did not yield a working man page with the appendix above. Something's still "blocking" conda's man pages from being indexed. I'm currently out of ideas :)

@tsnow03
Copy link
Member

tsnow03 commented May 18, 2023

Sounds like a path issue, since conda is installing to a different location than apt... a bit hard to address for things outside of the docker build since there's no sudo access to force the database to update. Might be able to fix it with environmental variables-- try MANPATH=$CONDA_PREFIX/share/man? (see this issue ) and see if that fixes things? *Advice from @espg

@MattF-NSIDC
Copy link
Author

MattF-NSIDC commented May 18, 2023

I did just successfully view a man page for gdalinfo by setting the MANPATH as described :) Thank you! (I was looking at the same conda/conda issue!)

@MattF-NSIDC
Copy link
Author

MattF-NSIDC commented May 19, 2023

Took me a while to get all the parts right, but I think I'll have a PR shortly. From man 5 manpath:

If the value of $MANPATH starts with a colon, then the default search path is added at its start. If the value of $MANPATH ends with a colon, then the default search path is added at its end. If the value of $MANPATH contains a double colon (::), then the default search path is inserted in the middle of the value, between the two colons.

At first, I didn't realize this and so while I was fixing man pages for conda-installed packages, I was breaking them for system packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants