From: Jason Gunthorpe <jgg@ziepe.ca>
To: "Thorben Römer" <thorben.roemer@secunet.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: install-step fails for pandoc-prebuilt man-pages in infiniband-diags/man
Date: Tue, 10 Dec 2019 13:29:47 -0400 [thread overview]
Message-ID: <20191210172947.GB46@ziepe.ca> (raw)
In-Reply-To: <1602a0d4-4849-d9a8-2123-852966815cd0@secunet.com>
On Tue, Dec 10, 2019 at 08:31:20AM +0100, Thorben Römer wrote:
> > and yes, the no-pandoc builds have to use the standard paths.
>
> Is this documented somewhere?
Generanlly the no-pandoc build is only for some old OS's. Most new
OS's should be installing pandoc and avoiding this flow.
> >> With my limited time and expertise in the rdma-core project, I was only
> >> able to come up with a solution that I don't find very practical. I will
> >> append a diff of pandoc-prebuilt.py nonetheless, which replaces
> >> hashing-calls for *.rst to *.in.rst if applicable.
> >
> > This just makes broken output if pandoc is not present, it is not practical.
>
> The diff just changes the filename from *.rst to *.in.rst before hashing
> (get_id()). pandoc/rst2man are still called on the *.rst files (NOT the
> *.in.rst files), but the filename is now based on the *.in.rst-file.
But the scheme is to store the *output* of pandoc under the content
hash of the input.
So hashing the wrong input means you get the wrong output.
The hash *must* be the exact input to pandoc and rst2man.
> > The only good options is to shift the substition to after
> > pandoc/rst2man run - but I'm not sure if that is doable..
>
> To my understanding, this is basically what my diff does (although it
> does not "shift" the substition, but rather just uses the unsubsituted
> files to produce the names (hashes) for the prebuilt documentation). But
> as I said previously, I also do not consider it a good fix for the problem.
The shift is essential, if we retain @CMAKE_FOO@ through to the nroff
then we could do substititon on the nroff output and everything would
work sensibly.
This seems a bit hard, but is the right way to make this work.
Alternatively for your use case it might be more reasonable to copy
the pandoc prebuilt files from a system with pandoc, that did a build
with your desired path, onto your system without.
Jason
prev parent reply other threads:[~2019-12-10 17:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-04 14:34 install-step fails for pandoc-prebuilt man-pages in infiniband-diags/man Thorben Römer
2019-12-05 8:12 ` Leon Romanovsky
2019-12-09 19:39 ` Jason Gunthorpe
2019-12-10 7:31 ` Thorben Römer
2019-12-10 17:29 ` Jason Gunthorpe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191210172947.GB46@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=thorben.roemer@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).