Skip to content

make varlink optional for podman#987

Closed
baude wants to merge 3 commits intocontainers:masterfrom
baude:varlink_optional
Closed

make varlink optional for podman#987
baude wants to merge 3 commits intocontainers:masterfrom
baude:varlink_optional

Conversation

@baude
Copy link
Member

@baude baude commented Jun 22, 2018

some platforms and operating systems do not have varlink. in those cases,
we need to be able to turn off enablement of varlink in podman. this can now
be done with BUILDTAGS passed to the build though perhaps in the future
will be better.

the default is to build with varlink

Signed-off-by: baude [email protected]

Makefile Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to hard-code varlink here? I'd have expected the default to depend on whether or not some system library or similar was available, and that we'd have a hack/ script to detect that dependency.

Copy link
Member Author

Choose a reason for hiding this comment

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

Eventually yes, today no

Makefile Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

You have inconsistent indenting with spaces here and a tab two lines above.

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure what gives there; should be fixed now

Makefile Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you intentionally removing this blank line? I think the blank line helps to more clearly associate the following comment with its block of Make code.

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

Makefile Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of gutting this recipe when WANTVARLINK is false, I'd rather adjust the consumers to remove the cmd/podman/varlink/ioprojectatomicpodman.go dependency if WANTVARLINK is false.

For example, we could have a VARLINK_GO_DEPS variable (or some such) that we setup where you're currently setting up WANTVARLINK, and then use VARLINK_GO_DEPS where we currently use cmd/podman/varlink/ioprojectatomicpodman.go as a dependency.

Copy link
Member Author

Choose a reason for hiding this comment

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

can you provide an example? i like where you are headed but my Make-fu sucks ... alternatively and perhaps even better, how would you feel about pushing this PR through (it does in fact work) and then having you make a superior PR that contains some of the great stuff you put here.

Copy link
Contributor

Choose a reason for hiding this comment

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

can you provide an example?

I've filed a squash commit as baude#1. Squash that commit in if you like it, and feel free to mess with the commit message suggestions.

Copy link
Contributor

Choose a reason for hiding this comment

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

This approach won't scale well with additional optional commands behind different tags. Perhaps we could have a varlinkCommand pointer that we setup in varlink.go in the varlink case and set nil in varlink_dummy.go (or some such) in the !varlink case?

Copy link
Contributor

Choose a reason for hiding this comment

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

This approach won't scale well with additional optional commands behind different tags.

I've filed baude#2 with a squash commit for this suggestion.

some platforms and operating systems do not have varlink.  in those cases,
we need to be able to turn off enablement of varlink in podman. this can now
be done with BUILDTAGS passed to the build though perhaps in the future
will be better.

the default is to build with varlink

Signed-off-by: baude <[email protected]>
@baude baude force-pushed the varlink_optional branch from 9f52b64 to 52b3903 Compare June 22, 2018 19:20
The API.md and cmd/podman/varlink/ioprojectatomicpodman.go targets
will continue to work regardless of the presence (or not) of 'varlink'
is in BUILDTAGS.  However, cmd/podman/varlink/ioprojectatomicpodman.go
is now only required by the podman target when BUILDTAGS contains
'varlink'.

API.md had also been an podman dependency since 5b2627d (Makefile:
Drop find-godeps.sh for podman target, 2018-05-15, containers#776) when I
expanded varlink_api_generate.  It had been an indirect podman
dependency (via varlink_api_generate) since 2526355 (Generate varlink
API documentation automatically, 2018-05-07, containers#734).  But the podman
executable obviously doesn't depend on the Markdown file, so I'm
removing that dependency here.

Signed-off-by: baude <[email protected]>
@baude baude force-pushed the varlink_optional branch from 355a1ca to 91ca342 Compare June 22, 2018 19:59
The command-pointer approach will scale well if/when we add additional
optional commands behind their own build tags, because those tags
won't all be competing for the same getOptionalCommands namespace.

Signed-off-by: W. Trevor King <[email protected]>
@baude
Copy link
Member Author

baude commented Jun 22, 2018

comments from @wking addressed...ready for merge please

@rhatdan
Copy link
Member

rhatdan commented Jun 23, 2018

LGTM

Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

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

LGTM, @wking 's concerns can be addressed in a follow up.

@rhatdan
Copy link
Member

rhatdan commented Jun 24, 2018

@rh-atomic-bot r+

@rh-atomic-bot
Copy link
Collaborator

📌 Commit 6a86956 has been approved by rhatdan

@rh-atomic-bot
Copy link
Collaborator

⚡ Test exempted: merge already tested.

@wking
Copy link
Contributor

wking commented Jun 24, 2018

Looks like @rh-atomic-bot squashed these for us.

@baude baude deleted the varlink_optional branch December 22, 2019 19:15
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants