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

Manpage cleanups #1372

Merged
merged 13 commits into from
Jun 6, 2018
Merged

Manpage cleanups #1372

merged 13 commits into from
Jun 6, 2018

Conversation

marschap
Copy link
Contributor

This pull request

  • adds DocBook sources for npa-tool, egk-tool, opensc-notify & opensc-asn1
    (I stick to my promises ;-)
  • installs the man pages for them from doc/tools instead from src/tools
  • fixes test-manpage.sh to check in a safer manner instead of blocking on some tools
  • improves markup of option groups, alternatives, ... from hard-coded to DocBook tags
  • adds option descriptions to man pages that test-manpage.sh found missing
Checklist
  • Documentation is added or updated

* egk-tool.1.xml
* npa-tool.1.xml
* opensc-asn1.1.xml
* opensc-notify.1.xml
* get rid of hard-coded markup like e.g. { ... | ... } or [ ... ]
  in favour of DocBook's proper tags
* use tags better matching the purpose,
  e.g. use <filename class"directory"> instead of <command> for directories
* improve consistency in <replaceable>s
They have been moved to doc/tools and are generated there.
Call the tools to be tested with option '--help' to avoid
triggering automatic actions when no option is given.

Exampleswhy the old behaviour is bad:
- opensc-notify: blocks the build
- opensc-explorer: tries to open the card
@marschap marschap mentioned this pull request May 31, 2018
Also try to consolidate the coding style a bit
@marschap marschap mentioned this pull request May 31, 2018
1 task
@frankmorgner
Copy link
Member

looks good, thanks.

I think the reference to help2man can also be removed from configure.ac and .travis.yml

Now that we have proper DocBook sources for all man pages formerly
generated using help2man, it is not needed anymore.
Now that we have proper DocBook sources for all man pages formerly
generated using help2man, it is not needed anymore.
Now that we have proper DocBook sources for them, they can be safely removed.
@marschap
Copy link
Contributor Author

marschap commented Jun 1, 2018

I am at a loss.
Upon Frank's request I removed help2man references from configure.ac & .travis.yml
In addition I also removed the legacy man pages from src/tools and also removed the reference to them in Makefile.am.
This un-broke the Linux build, but the MacOS build still fails:
It complains about missing help2man, but I do not find any occurrence of help2man in the code any more.
Any help appreciated!

@frankmorgner
Copy link
Member

I forgot that help2man is still a dependency when building OpenPACE (as done in MacOSX/build-package.in). So your current change set should be OK.

@marschap
Copy link
Contributor Author

marschap commented Jun 1, 2018

Phew! It works.

@frankmorgner
Copy link
Member

Do you have a link that discusses the correct usage of xslt for man pages or is there some other documentation available?

@marschap
Copy link
Contributor Author

marschap commented Jun 5, 2018

I am not sure I understand your question correctly. Please bear with me if my answer missed the point.
I assume you're talking about the xml (i.e. not xslt) structure used for man pages, and the markup used for specific purposes.

In my understanding there is a "practical agreement" (by majority of documentation ;-) of using DocBook as the standard format for documentation in OpenSC. I can only speculate on the reasons (well known standard, versatility, ...)

DocBook as a documentation standard is documented on http:https://tdg.docbook.org/, with manual pages explicitly mentioned in https://tdg.docbook.org/tdg/5.2/ch02.html#making-refentry (similar entries in previous versions), mentioning <refentry> as the top-level tag for manual pages.

The tag reference then mentions explicitly what a tag is for, what attributes it can take, with what values (e.g. <filename class="directory"> to denote a directory) and what subordinate tag are allowed inside the tag.
By browsing through that reference you then end up at tags like e.g. <group> where the reference https://tdg.docbook.org/tdg/5.2/group.html explicitly stated how the tag is expected to be formatted.

Does this answer the question?

@frankmorgner
Copy link
Member

Yes, that was my question. I am a bit overwhelmed by the pure size of the DocBook standard, so that I have difficulties to figure out what tags/attributes are relevant when writing a manpage...

@marschap
Copy link
Contributor Author

marschap commented Jun 5, 2018

Yeah, its a trove of information, isn't it.
I spent quite a few hours over the weekend on going through the Docbook reference to find what tags match best and and trying out whether the results match the intended meaning.

Is there a reason not to pull this request into main?

  • It has no conflicts with main
  • it improves documentation
  • it consolidates documentation
  • it fixed test-manpage.sh to find more undocumented command line options
    and not to block on opensc-notify
  • I answered hopefully all your questions
  • ...

@frankmorgner frankmorgner merged commit 76725d5 into OpenSC:master Jun 6, 2018
@frankmorgner
Copy link
Member

thanks

@marschap marschap deleted the manpage-cleanups branch June 9, 2018 07:25
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 this pull request may close these issues.

None yet

2 participants