Skip to content

Conversation

@hqhq
Copy link
Contributor

@hqhq hqhq commented May 20, 2016

vbatts/pandoc is the image name, not path of pandoc command,
so I don't think it's necessary to be configurable.

cc @wking

Signed-off-by: Qiang Huang h.huangqiang@huawei.com

`vbatts/pandoc` is the image name, not path of pandoc command,
so I don't think it's necessary to be configurable.

cc @wking

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
@laijs
Copy link
Contributor

laijs commented May 20, 2016

LGTM

@@ -1,6 +1,5 @@

DOCKER ?= $(shell command -v docker)
PANDOC ?= $(shell command -v pandoc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is better to keep PANDOC
PANDOC ?= vbatts/pandoc

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geez this is now a little messy.
Perhaps this $(PANDOC) change best be reverted. Otherwise the whole command for the docs target will have to be overhauled to allow for a local pandoc binary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Mon, May 23, 2016 at 12:23:18PM -0700, Vincent Batts wrote:

Otherwise the whole command for the docs target will have to be
overhauled to allow for a local pandoc binary.

How difficult would this be? It looks like it's just moving
‘$(DOCKER) … -u $(shell id -u)’ into a PANDOC fallback (if the shell
can find a local ‘docker’ but not a local ‘pandoc’).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and also making the path to the input and output files

On Mon, May 23, 2016 at 3:31 PM W. Trevor King notifications@github.com
wrote:

In Makefile
#440 (comment)
:

@@ -1,6 +1,5 @@

DOCKER ?= $(shell command -v docker)
-PANDOC ?= $(shell command -v pandoc)

On Mon, May 23, 2016 at 12:23:18PM -0700, Vincent Batts wrote: Otherwise
the whole command for the docs target will have to be overhauled to allow
for a local pandoc binary.
How difficult would this be? It looks like it's just moving ‘$(DOCKER) …
-u $(shell id -u)’ into a PANDOC fallback (if the shell can find a local
‘docker’ but not a local ‘pandoc’).


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
https://github.com/opencontainers/runtime-spec/pull/440/files/5c27e4256d36759e7d1055e9a97e931a1cf79124#r64273634

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Mon, May 23, 2016 at 12:57:53PM -0700, Vincent Batts wrote:

@@ -1,6 +1,5 @@

DOCKER ?= $(shell command -v docker)
-PANDOC ?= $(shell command -v pandoc)

and also making the path to the input and output files

Ah, yes. So easiest way to support local pandoc is probably leave
PANDOC variable here and make the docs rules conditional. If PANDOC
is non-empty, use:

$(PANDOC) -f markdown_github -t latex -o $@ $(DOC_FILES)

and if PANDOC is empty use the current $(DOCKER) invocation with the
hard-coded vbatts/pandoc image.

The alternative is to make variables for the input and output
directories and set them conditionally depending on whether PANDOC is
empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to offer such flexibility? Or does pandoc version matters a lot?
I don't think we should make the Makefile complex to meet such needs, I think people who really want to use their own local pandoc can use it directly without Makefile.

Copy link
Contributor

@wking wking May 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Mon, May 23, 2016 at 08:21:25PM -0700, Qiang Huang wrote:

Is it necessary to offer such flexibility? Or does pandoc version
matters a lot?

The flexibility is just “I want to build the docs easily without
installing Docker”. I don't think pandoc versions matter much for us.

I don't think we should make the Makefile complex to meet such
needs, I think people who really want to use their own local pandoc
can use it directly without Makefile.

Sure, but supporting them in the Makefile isn't all that much more
complex. See #448, which also makes the Docker fallback case DRYer
and adds error handling for folks who have neither Docker nor pandoc
installed locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, #448 looks good to me, I'll close this PR, thanks.

@wking
Copy link
Contributor

wking commented May 20, 2016

On Thu, May 19, 2016 at 07:42:43PM -0700, Qiang Huang wrote:

vbatts/pandoc is the image name, not path of pandoc command,
so I don't think it's necessary to be configurable.

Ah, I had missed all the line continuations, thanks. Why are we using
a pandoc image instead of a local command? That local command could
always be ‘docker run … vbatts/pandoc’.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request May 24, 2016
In dc9daf9 (Makefile: Replace vbatts/pandoc with a PANDOC variable
2016-05-06, opencontainers#428) I'd misunderstood vbatts/pandoc as a call to a
locally-installed pandoc, when it's actually the name of a Docker
image [1,2].  With this commit, we prefer a local pandoc if one
exists, fall back to Docker and vbatts/pandoc if a local 'docker'
exists, and raise an error if neither 'pandoc' nor 'docker' exist.

[1]: opencontainers#440
[2]: opencontainers#428 (comment)

Reported-by: Qiang Huang <h.huangqiang@huawei.com>
Reported-by: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
@hqhq hqhq closed this May 24, 2016
Mashimiao pushed a commit to Mashimiao/specs that referenced this pull request Aug 19, 2016
In dc9daf9 (Makefile: Replace vbatts/pandoc with a PANDOC variable
2016-05-06, opencontainers#428) I'd misunderstood vbatts/pandoc as a call to a
locally-installed pandoc, when it's actually the name of a Docker
image [1,2].  With this commit, we prefer a local pandoc if one
exists, fall back to Docker and vbatts/pandoc if a local 'docker'
exists, and raise an error if neither 'pandoc' nor 'docker' exist.

[1]: opencontainers#440
[2]: opencontainers#428 (comment)

Reported-by: Qiang Huang <h.huangqiang@huawei.com>
Reported-by: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: W. Trevor King <wking@tremily.us>
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.

4 participants