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

vendor in latest runtime-tools #828

Merged
merged 1 commit into from
Jun 27, 2018
Merged

Conversation

baude
Copy link
Member

@baude baude commented Jun 26, 2018

The latest runtime-tools is aware of other OS's than Linux. Libpod needs the newer
version to compile on darwin. Unfortunately, the API for generator.New() changed
and requires a string representation of the OS; furthermore, it also returns a
a generator and an error so code had to be adjusted for this too.

Signed-off-by: baude bbaude@redhat.com

if err != nil {
return options, err
}
spec := g.Config
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: This is fine, but you may want to consider renaming spec -> config as well. I don't know why the runtime-spec authors decided to use Spec for the structure backing config.json, but that JSON is a configuration based on a specification, not a specification in its own right (also why the file is not specification.json ;).

@@ -177,8 +177,11 @@ func DefaultNamespaceOptions() NamespaceOptions {
{Name: string(specs.UserNamespace), Host: true},
{Name: string(specs.UTSNamespace), Host: true},
}
g := generate.New()
spec := g.Spec()
g, err := generate.New("linux")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with hard-coding this here, because any cross-platform buildah implementation would have to switch OSes at a higher level, and only call DefaultNamespaceOptions on Linux (since that function makes no sense on other OSes).

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, thats the conclusion I came to as well

The latest runtime-tools is aware of other OS's than Linux.  Libpod needs the newer
version to compile on darwin.  Unfortunately, the API for generator.New() changed
and requires a string representation of the OS; furthermore, it also returns a
a generator and an error so code had to be adjusted for this too.

Signed-off-by: baude <bbaude@redhat.com>
@TomSweeneyRedHat
Copy link
Member

LGTM and happy green test buttons

@rhatdan
Copy link
Member

rhatdan commented Jun 27, 2018

@rh-atomic-bot r+

@rh-atomic-bot
Copy link
Collaborator

📌 Commit b599244 has been approved by rhatdan

@rh-atomic-bot
Copy link
Collaborator

⌛ Testing commit b599244 with merge bf9a67a...

rh-atomic-bot pushed a commit that referenced this pull request Jun 27, 2018
The latest runtime-tools is aware of other OS's than Linux.  Libpod needs the newer
version to compile on darwin.  Unfortunately, the API for generator.New() changed
and requires a string representation of the OS; furthermore, it also returns a
a generator and an error so code had to be adjusted for this too.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #828
Approved by: rhatdan
@rh-atomic-bot
Copy link
Collaborator

💔 Test failed - status-papr

@rhatdan
Copy link
Member

rhatdan commented Jun 27, 2018

Seems homu is hosed. Merging manually.

@rhatdan rhatdan merged commit 7919c96 into containers:master Jun 27, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants