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 missing #40

Closed
bahamat opened this issue Oct 20, 2013 · 17 comments
Closed

Man pages missing #40

bahamat opened this issue Oct 20, 2013 · 17 comments

Comments

@bahamat
Copy link
Contributor

bahamat commented Oct 20, 2013

The man pages in community edition are in /var/cfengine/share/man/man8/.

I don't know yet if they're in the package and not in the right place, or missing entirely. I wanted to get this in while it was on my mind.

@basvandervlies
Copy link
Collaborator

Just a observation in this repository there is no docs directory. So that is why we can not install them.

@tzz
Copy link
Collaborator

tzz commented Nov 5, 2013

What can I do to help here?

@tzz tzz mentioned this issue Nov 5, 2013
@bahamat
Copy link
Contributor Author

bahamat commented Nov 5, 2013

The best thing would be for the man pages to be included with the tarball form cfengine. Do you know why they're missing?

@tzz tzz closed this as completed Nov 6, 2013
@tzz tzz reopened this Nov 6, 2013
@tzz
Copy link
Collaborator

tzz commented Nov 6, 2013

Oops, wrong button, sorry

@tzz
Copy link
Collaborator

tzz commented Nov 6, 2013

IIRC the man pages are supposed to be in the package, but don't know about the tarball. I think they can be generated from source, either way.

@nickanderson @vohi @cduclos can you comment please?

@basvandervlies
Copy link
Collaborator

In the 3.5.x and master branch there is the directory:

  • doc/manpages
bas@r7n16:/var/tmp/bas/core/docs/manpages$ ls        
cf-agent.8  cf-execd.8  cf-key.8  cf-monitord.8  cf-promises.8  cf-runagent.8  cf-serverd.8  Makefile  Makefile.am  Makefile.in

@bahamat
Copy link
Contributor Author

bahamat commented Nov 6, 2013

Debian imports from the tar all though, not the upstream repo.

@basvandervlies
Copy link
Collaborator

@bahamat i know we fetch the tarball. I assume that the generation of the tarball goes wrong and does not include the docs directory.

@vohi
Copy link

vohi commented Nov 7, 2013

The man pages for the binaries are generated by the binaries themselves, via (undocumented) -M command line parameter. There are no man-pages checked into the repository (https://github.com/cfengine/core/tree/master/docs/manpages).

They can't be in the tar ball for that reason, because we don't compile the binaries before we generate the tar ball. There's https://cfengine.com/dev/issues/2989 as a known issue in our own packages.

@bahamat
Copy link
Contributor Author

bahamat commented Nov 7, 2013

Ok, that makes a bit more sense. We can add a build step that generates and saves them.

@tzz
Copy link
Collaborator

tzz commented Nov 12, 2013

Cool, now it makes sense, thanks @vohi

@bahamat
Copy link
Contributor Author

bahamat commented Nov 12, 2013

Ted suggested using an acceptance test to create the man pages because the tests already know how to execute the binaries properly.

@ghost ghost assigned bahamat Nov 12, 2013
@bahamat
Copy link
Contributor Author

bahamat commented Nov 12, 2013

This patch successfully produces man pages, although I don't think this is the best approach.

Any suggestions on improving this?

diff --git a/debian/rules b/debian/rules
index 10086c9..cd1934b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -59,3 +59,11 @@ override_dh_install:

   /bin/rmdir $(CURDIR)/debian/cfengine3/var/lib/cfengine3/inputs
   /bin/rm $(CURDIR)/debian/cfengine3/usr/lib/*.la
+  /bin/mkdir -p $(CURDIR)/debian/cfengine3/usr/share/man/man8/
+  LD_LIBRARY_PATH=$(CURDIR)/debian/cfengine3/usr/lib $(CURDIR)/debian/cfengine3/usr/sbin/cf-agent -M > $(CURDIR)/debian/cfengine3/usr/share/man/man8/cf-agent.8
+  LD_LIBRARY_PATH=$(CURDIR)/debian/cfengine3/usr/lib $(CURDIR)/debian/cfengine3/usr/sbin/cf-execd -M > $(CURDIR)/debian/cfengine3/usr/share/man/man8/cf-execd.8
+  LD_LIBRARY_PATH=$(CURDIR)/debian/cfengine3/usr/lib $(CURDIR)/debian/cfengine3/usr/sbin/cf-key -M > $(CURDIR)/debian/cfengine3/usr/share/man/man8/cf-key.8
+  LD_LIBRARY_PATH=$(CURDIR)/debian/cfengine3/usr/lib $(CURDIR)/debian/cfengine3/usr/sbin/cf-monitord -M > $(CURDIR)/debian/cfengine3/usr/share/man/man8/cf-monitord.8
+  LD_LIBRARY_PATH=$(CURDIR)/debian/cfengine3/usr/lib $(CURDIR)/debian/cfengine3/usr/sbin/cf-promises -M > $(CURDIR)/debian/cfengine3/usr/share/man/man8/cf-promises.8
+  LD_LIBRARY_PATH=$(CURDIR)/debian/cfengine3/usr/lib $(CURDIR)/debian/cfengine3/usr/sbin/cf-runagent -M > $(CURDIR)/debian/cfengine3/usr/share/man/man8/cf-runagent.8
+  LD_LIBRARY_PATH=$(CURDIR)/debian/cfengine3/usr/lib $(CURDIR)/debian/cfengine3/usr/sbin/cf-serverd -M > $(CURDIR)/debian/cfengine3/usr/share/man/man8/cf-serverd.8

There's still no man page for rpmvercmp, but I'm overriding that.

@basvandervlies
Copy link
Collaborator

@bahamat maybe this:

    for p in cf-agent cf-key cf-promises cf-runagent cf-execd cf-serverd cf-monitord; \
    do \
        $(CURDIR)/$$p/$$p -M > $(CURDIR)/debian/cfengine3/usr/share/man/man8/$$p.8 ;\
    done

I tested this and it works.

@bahamat
Copy link
Contributor Author

bahamat commented Nov 13, 2013

Excellent, thanks. I'll use that.

@basvandervlies
Copy link
Collaborator

I have issued sn pull request #51

@basvandervlies
Copy link
Collaborator

and applied

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

No branches or pull requests

4 participants