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

Publish manpages online #872

Open
nbraud opened this issue Dec 12, 2023 · 7 comments
Open

Publish manpages online #872

nbraud opened this issue Dec 12, 2023 · 7 comments

Comments

@nbraud
Copy link

nbraud commented Dec 12, 2023

Would it be possible to publish shadow's manpages online, as rendered to HTML?
I'm aware many distros already have some central service to query all their manpages from, but it would be really useful to have a reference source to link that is distro-agnostic and faithful-to-upstream.

The implementation could be as simple as a GitHub action that automatically builds and publishes the manpages when they are pushed to master.

@jubalh
Copy link
Member

jubalh commented Dec 12, 2023

Probably you are aware of the following, I just wanted to mention it for others as well:

it would be really useful to have a reference source to link that is distro-agnostic and faithful-to-upstream.

Be aware that some man pages are are only built when a certain configure flag is enabled/disabled (for example man5/limits.5, man1/getsubids.1).
Additionally distributions might adapt man pages in case they change some settings in their packaging process.
And man pages can change depending on the shadow version. So we might have to publish them for each release.
Overall I think it's safer if people consult the man pages of their specific installation.

@nbraud
Copy link
Author

nbraud commented Dec 12, 2023

Be aware that some man pages are are only built when a certain configure flag is enabled/disabled (for example man5/limits.5, man1/getsubids.1).
Yes, I was (implicitly) assuming all manpages should be produced for an “online doc,” but that's a good point: those manpages do not state which configuration it's available in... which makes sense for pages meant to be consulted as-installed.

And man pages can change depending on the shadow version. So we might have to publish them for each release.

Yes, I didn't mention that above either, but it's not significantly harder to build a set of manpages per release.

Additionally distributions might adapt man pages in case they change some settings in their packaging process. [...]
Overall I think it's safer if people consult the man pages of their specific installation.

I'm aware some distros do modify shadow quite extensively, which is why I wouldn't want to use the manpage from my particular system to discuss shadow in general (since I then have to check whether it's affected by distro's patches etc.)

(I did notice there were no pre-rendered manpages while doing some documentation for a distro, but in that case I agree the correct solution is to render & publish the manpage from the distro's packages)

@alejandro-colomar
Copy link
Collaborator

Hmmm, I already do that for the Linux man-pages (as a PDF book, not as HTML). See https://www.alejandro-colomar.es/share/dist/man-pages/git/HEAD/man-pages-HEAD.pdf; I have a git hook regenerating the PDF every time I push to the main branch.
I also publish a PDF for every release; e.g., https://www.alejandro-colomar.es/share/dist/man-pages/6/6.06/man-pages-6.06.pdf.

I may do that for shadow stable releases and git HEAD, using the default configuration. The git hook will be in my server, to which I push manually, which means it may be a few commits behind GH, of course.

@alejandro-colomar
Copy link
Collaborator

alejandro-colomar commented Mar 9, 2024

https://www.alejandro-colomar.es/share/dist/shadow/git/HEAD/shadow-HEAD.pdf

The navigation index of the PDF has some problems. I've reported them to the author of the script, so hopefully that'll get fixed soon.

@alejandro-colomar
Copy link
Collaborator

alejandro-colomar commented Mar 9, 2024

And the 4.15.0 ones (this one is PGP-signed, as it's manually uploaded):

https://www.alejandro-colomar.es/share/dist/shadow/4/4.15/4.15.0/

@alejandro-colomar
Copy link
Collaborator

https://www.alejandro-colomar.es/share/dist/shadow/git/HEAD/shadow-HEAD.pdf

The navigation index of the PDF has some problems. I've reported them to the author of the script, so hopefully that'll get fixed soon.

Thanks to @DeriJames, we already have the PDF for the master branch with proper bookmarks (you can already find it in the link above).

https://lore.kernel.org/linux-man/ZfCAtl5Q-F2uPJM4@debian/T/#m8d20a678683625017a0a2e7c13c3ee2138893d54

I won't regenerate the PDF for 4.15.0, but any new versions will be built with the fixed script.

I could also publish the pages in the other languages, but I'd need to build Deri's branch of gropdf from source. I'll need to update the script to allow running a custom gropdf(1) that I'll install in /opt/local/.

Cheers,
Alex

@alejandro-colomar
Copy link
Collaborator

Translations are now available at https://www.alejandro-colomar.es/share/dist/shadow/git/HEAD/man/.

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

No branches or pull requests

3 participants