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

Use buildah commit and bud in podman #681

Closed
wants to merge 1 commit into from
Closed

Conversation

baude
Copy link
Member

@baude baude commented Apr 26, 2018

Vendor in buildah and use as much of commit and bud as possible for podman
build and commit.

Resolves #586
Signed-off-by: baude [email protected]

@mheon
Copy link
Member

mheon commented Apr 26, 2018

LGTM

// Cmd
// We cannot differentiate between cmd and entrypoint here
// so we assign args to both
importBuilder.SetCmd(c.Spec().Process.Args)
Copy link
Member

Choose a reason for hiding this comment

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

When we "docker commit" a container there, which of these is/are set in the image's configuration when you then "docker inspect" the result?

Copy link
Member Author

Choose a reason for hiding this comment

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

The both appear to make it

@rhatdan
Copy link
Member

rhatdan commented Apr 26, 2018

Can you grab the tests from buildah.bud to make sure they work.
bud.bats and all of the subdirs of bud.

@baude
Copy link
Member Author

baude commented Apr 26, 2018

you want to add bats tests back into libpod?

@rhatdan
Copy link
Member

rhatdan commented Apr 26, 2018

@baude or convert them to the new format.

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.

Good first pass. what a mess load of vendored files. Hope it doesn't make things too huge!

for _, fileName := range c.StringSlice("file") {
budCmdArgs = append(budCmdArgs, "--file", fileName)
}
// The following was taken directly from projectatomic/buildah/cmd/bud.go
Copy link
Member

Choose a reason for hiding this comment

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

Can we keep this code in Buildah, vendor it in and then call that code from here? Otherwise we'll have two places to make changes in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

i didnt see any obvious ways

Copy link
Member

Choose a reason for hiding this comment

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

Lets move forward on this and revisit it in the future. @baude Could you add a FIXME or something suggesting that we look into a way to vendor or share the code between podman and buildah.

}
}
pullPolicy := imagebuildah.PullNever
if c.BoolT("pull") {
Copy link
Member

Choose a reason for hiding this comment

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

will these still work? Or are all the flags defined in buildachl? I thought a few from here weren't there. I'd to go through some hoops to get the global flags working. There's a difference between Buildah's and Podman's global flags. Are they all hip?

Copy link
Member Author

Choose a reason for hiding this comment

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

if they are local variables yes.


case "ImportImage":
return s__.ioprojectatomicpodmanInterface.ImportImage(VarlinkCall{call})
case "PullImage":
Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat Apr 26, 2018

Choose a reason for hiding this comment

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

This is an awful lot of seemingly unrelated to the build changes stuff. I'd prefer it in it's own PR. Easier parsing the history months from now if there's an issue in either.

Copy link
Member Author

Choose a reason for hiding this comment

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

that is a dynamically generated file. nothing i can do about that

@TomSweeneyRedHat
Copy link
Member

Travis tests are failing with a seccomp error that I don't recall seeing before....

# github.com/projectatomic/libpod/vendor/github.com/seccomp/libseccomp-golang
vendor/github.com/seccomp/libseccomp-golang/seccomp_internal.go:25:2: error: #error Minimum supported version of Libseccomp is v2.2.0
 #error Minimum supported version of Libseccomp is v2.2.0
  ^
make: *** [podman] Error 2

@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably 39a7a77) made this pull request unmergeable. Please resolve the merge conflicts.

@mheon
Copy link
Member

mheon commented Apr 26, 2018

Some failing commit tests

@baude baude force-pushed the build branch 3 times, most recently from c866983 to 00adca1 Compare April 27, 2018 17:37
@mheon
Copy link
Member

mheon commented Apr 27, 2018

LGTM once tests are green

@@ -125,6 +125,7 @@ type ImageData struct {
RootFS *RootFS `json:"RootFS"`
Labels map[string]string `json:"Labels"`
Annotations map[string]string `json:"Annotations"`
ManifestType string `json:ManifestType`
Copy link
Member

Choose a reason for hiding this comment

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

Need "" marks around ManifestType

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

@baude baude force-pushed the build branch 2 times, most recently from bbc6a8e to 53cb271 Compare April 27, 2018 18:19
@mheon
Copy link
Member

mheon commented Apr 27, 2018

Need to manually build + install libseccomp >= 2.2.0 for travis

@baude baude force-pushed the build branch 2 times, most recently from 9cb98f9 to a3f7e64 Compare April 27, 2018 19:04
.travis.yml Outdated
@@ -11,7 +11,7 @@ before_install:
- sudo apt-get -qq install autoconf automake bison e2fslibs-dev libfuse-dev libtool liblzma-dev gettext

install:
- make install.tools
- make install.libseccomp.sudo install.tools
Copy link
Member

Choose a reason for hiding this comment

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

The Travis tests are all containerized, so these both do nothing

Copy link
Member

Choose a reason for hiding this comment

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

Need to add install.libseccomp.sudo to the Dockerfile and remove libseccomp from the things apt installs in the dockerfile

Makefile Outdated
@@ -249,6 +249,13 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man

varlink_generate: .gopathok cmd/podman/varlink/ioprojectatomicpodman.go

.PHONY: install.libseccomp.sudo
Copy link
Member

Choose a reason for hiding this comment

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

Move this to global .PHONY section

Makefile Outdated
git clone https://github.com/seccomp/libseccomp ../../seccomp/libseccomp
cd ../../seccomp/libseccomp && git checkout $(LIBSECCOMP_COMMIT) && ./autogen.sh && ./configure --prefix=/usr && make all && sudo make install


Copy link
Member

Choose a reason for hiding this comment

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

Extra newline

Makefile Outdated
install.libseccomp.sudo:
rm -rf ../../seccomp/libseccomp
git clone https://github.com/seccomp/libseccomp ../../seccomp/libseccomp
cd ../../seccomp/libseccomp && git checkout $(LIBSECCOMP_COMMIT) && ./autogen.sh && ./configure --prefix=/usr && make all && sudo make install
Copy link
Member

Choose a reason for hiding this comment

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

Need to define $LIBSECCOMP_COMMIT somewhere - I suggest whatever's the most recent stable tag?

@baude baude force-pushed the build branch 3 times, most recently from 536bec4 to 93dd25a Compare April 27, 2018 20:31
Vendor in buildah and use as much of commit and bug as possible for podman
build and commit.

Resolves containers#586
Signed-off-by: baude <[email protected]>
@mheon
Copy link
Member

mheon commented Apr 27, 2018

@rh-atomic-bot r+

@rh-atomic-bot
Copy link
Collaborator

📌 Commit 52fdca6 has been approved by mheon

@rh-atomic-bot
Copy link
Collaborator

⌛ Testing commit 52fdca6 with merge a824186...

@rh-atomic-bot
Copy link
Collaborator

☀️ Test successful - status-papr
Approved by: mheon
Pushing a824186 to master...

wking added a commit to wking/libpod that referenced this pull request May 11, 2018
This directory just had Markdown and vendor.conf.  I'm not sure why we
have it in our version control, maybe old versions of vndr kept it?
Or maybe folk dropped it into vendor/ by hand without using vndr?  The
history of that vendored directory is:

* 619637a (Handle Linux Capabilities from command line, 2017-11-03,
  containers#17) added the three files to our version control.
* c344fe6 (Update vendoring, 2017-11-22, containers#60) bumped hack/README.md.
* af64e10 (Vendor in lots of kubernetes stuff to shrink image size,
  2018-03-26, containers#554) bumped hack/README.md.
* 27107fd (Vendor in latest containers/image and contaners/storage,
  2018-04-18, containers#509) removed the files.
* a824186 (Use buildah commit and bud in podman, 2018-04-25, containers#681)
  added the files back.
* I'm removing them again in this commit.

With this commit,

  $ vndr github.com/docker/docker

becomes a no-op.

Signed-off-by: W. Trevor King <[email protected]>
rh-atomic-bot pushed a commit that referenced this pull request May 11, 2018
This directory just had Markdown and vendor.conf.  I'm not sure why we
have it in our version control, maybe old versions of vndr kept it?
Or maybe folk dropped it into vendor/ by hand without using vndr?  The
history of that vendored directory is:

* 619637a (Handle Linux Capabilities from command line, 2017-11-03,
  #17) added the three files to our version control.
* c344fe6 (Update vendoring, 2017-11-22, #60) bumped hack/README.md.
* af64e10 (Vendor in lots of kubernetes stuff to shrink image size,
  2018-03-26, #554) bumped hack/README.md.
* 27107fd (Vendor in latest containers/image and contaners/storage,
  2018-04-18, #509) removed the files.
* a824186 (Use buildah commit and bud in podman, 2018-04-25, #681)
  added the files back.
* I'm removing them again in this commit.

With this commit,

  $ vndr github.com/docker/docker

becomes a no-op.

Signed-off-by: W. Trevor King <[email protected]>

Closes: #752
Approved by: baude
@baude baude deleted the build branch December 22, 2019 18:45
@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 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 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.

6 participants