Commit Graph

3780 Commits

Author SHA1 Message Date
Daniel J Walsh c7e45ed842
Merge pull request #3677 from containers/dependabot/go_modules/github.com/spf13/cobra-1.3.0
build(deps): bump github.com/spf13/cobra from 1.2.1 to 1.3.0
2021-12-16 13:44:51 -05:00
Daniel J Walsh 2d5a2997a3
Merge pull request #3674 from flouthoc/cache_squashed
stage_executor: re-use all the layers from `cache` for `squashed` case and `commit` as late as possible.
2021-12-16 13:44:32 -05:00
OpenShift Merge Robot f05a4dcded
Merge pull request #3679 from flouthoc/memory-swap-unlimited
parse: allow parsing anomaly non-human value for memory control group
2021-12-16 17:59:50 +01:00
Aditya Rajan 93474047a2
parse: allow parsing anomaly non-human value for memory control group
Memory control group accepts an anomaly value of `-1` for setting `swap` to unlimited.
Buildah must accepts this value if specified.

Reference: https://github.com/opencontainers/runtime-spec/blob/main/config-linux.md#memory

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-16 17:29:08 +05:30
OpenShift Merge Robot 862c20cb87
Merge pull request #3680 from flouthoc/lock-nix-version
cirrus: remove `static_build`
2021-12-16 12:57:48 +01:00
Aditya Rajan 8de75fd901
.cirrus: remove static_build from ci
Remove `static_build` from ci as it is becoming hard to keep up with
`nix` hiccups in CI.

------
Before Deciding to remove static_build from CI we tried things below :
Things decided below worked but in order to keep maintaince simple
consensus was made to remove static_build. Read more here:
https://github.com/containers/buildah/pull/3679

It seems nixos/nix:latest expects nixbld user to be added and specified in
build-users-group but this should be only needed for multi-user
mode.

Hence I suspect latest push has a regression. Lock the nix to last working
image.

[NO NEW TESTS NEEDED]

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-16 14:50:02 +05:30
Aditya Rajan a74add5b50
stage_executor: re-use all possible layers from cache for squashed builds
Re-use all the layers from cache for squashed case and commit as late as possible

Current implementation of marking for re-use of cache `commits` on every
`stage` when used with `--squashed` however we should try to re-use as
many layers are possible if `--layers` is specified and `commit` only on
`last instruction` of `last stage` to perform final squash.

Also treat all other layers as if they are being written for regular
build and write them cache.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-15 17:04:26 +05:30
dependabot[bot] 7f1dc743c5
build(deps): bump github.com/spf13/cobra from 1.2.1 to 1.3.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-15 09:32:12 +00:00
OpenShift Merge Robot 857ba5ab06
Merge pull request #3594 from rhatdan/group
Allow rootless buildah to set resource limits on cgroup V2
2021-12-14 22:52:56 +01:00
Daniel J Walsh 300d9d1de1
Allow rootless buildah to set resource limits on cgroup V2
First move podman/pkg/cgroups into Buildah.
Only set resources to nil on non cgroupsv2 systems in rootless mode.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-14 12:36:03 -05:00
OpenShift Merge Robot 743b89520e
Merge pull request #3673 from containers/dependabot/go_modules/github.com/docker/docker-20.10.12incompatible
build(deps): bump github.com/docker/docker from 20.10.11+incompatible to 20.10.12+incompatible
2021-12-14 16:33:02 +01:00
dependabot[bot] 2573cf6ff3
build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.11+incompatible to 20.10.12+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.11...v20.10.12)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-14 09:33:32 +00:00
OpenShift Merge Robot 8781f5e4b7
Merge pull request #3670 from flouthoc/buildkit-refactor-tests
tests: move buildkit mount tests files from `TESTSDIR` to `TESTDIR` before any modifications
2021-12-13 11:53:29 +00:00
Aditya Rajan c7c75bd892
tests: move buildkit mount tests files from TESTSDIR to TESTDIR before modification
In certain environments tests are conducted from `/usr` where `selinux`
blocks certain operation so move all files where modifications are
expected from `$TESTSDIR` to `$TESTDIR`

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-12-11 17:36:26 +05:30
OpenShift Merge Robot 1f1b960989
Merge pull request #3664 from containers/dependabot/go_modules/github.com/opencontainers/runc-1.0.3
build(deps): bump github.com/opencontainers/runc from 1.0.2 to 1.0.3
2021-12-06 11:45:22 +00:00
dependabot[bot] 4d6c22fe3f
build(deps): bump github.com/opencontainers/runc from 1.0.2 to 1.0.3
Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Commits](https://github.com/opencontainers/runc/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 09:38:59 +00:00
OpenShift Merge Robot de86fabd31
Merge pull request #3663 from rhatdan/error
Wire logger through to config
2021-12-03 18:56:45 +00:00
Daniel J Walsh cc4149b1e1
Merge branch 'main' into error 2021-12-03 10:59:26 -05:00
OpenShift Merge Robot 080d8393f0
Merge pull request #3654 from MaximUltimatum/patch-1
[CI:DOCS] Simple README fix
2021-12-03 15:30:47 +01:00
Daniel J Walsh 5b1b0d27ca
Wire logger through to config
Currently we are only wiring the logger into run_linux.go
Not into the Config section.

This PR is needed in order to update vendor in Podman.
https://github.com/containers/podman/pull/12375

[NO NEW TESTS NEEDED] Tests will be done in Podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-12-03 09:27:55 -05:00
OpenShift Merge Robot 6d01253522
Merge pull request #3637 from rhatdan/cgroup
Grab all of the containers.conf settings for namespaces
2021-11-30 19:53:33 +01:00
OpenShift Merge Robot d469df25af
Merge pull request #3658 from nalind/copier-stat-symlink
copier.Put: check for is-not-a-directory using lstat, not stat
2021-11-30 18:25:33 +01:00
Nalin Dahyabhai 7631600e72 copier.Put: check for is-not-a-directory using lstat, not stat
When checking if something that we want to overwrite with a directory is
already a directory or not, use lstat instead of stat.  If it's a
symbolic link, it's not a directory.

This is a subtle behavior change, but it's in line with docker build.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-11-30 10:28:53 -05:00
Daniel J Walsh b480ce832f
Turn on rootless cgroupv2 tests
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-30 10:24:01 -05:00
Daniel J Walsh 05d5d22dc6
Grab all of the containers.conf settings for namespaces.
Buildah is mainly building with Host Namespaces, this changes most
namespaces to be private matching Podman and using containers.conf

Fixes: https://github.com/containers/buildah/issues/3634

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-30 10:24:00 -05:00
OpenShift Merge Robot fc4c263537
Merge pull request #3657 from nalind/mediaType
image: set MediaType in OCI manifests
2021-11-30 10:24:21 +01:00
OpenShift Merge Robot 898db4381c
Merge pull request #3656 from nalind/copier-removeall
copier: RemoveAll possibly-directories
2021-11-30 09:52:22 +01:00
Nalin Dahyabhai 785b3bf30a image: set MediaType in OCI manifests
In image-spec 1.0.2, the MediaType field is now available in OCI
manifests, so set it.

Update the imgtype helper to output the MediaType field as-is from OCI
image manifests instead of just always supplying the expected value.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-11-29 20:04:09 -05:00
Nalin Dahyabhai 933c8c89fb copier: RemoveAll possibly-directories
When we attempt to remove a directory to make way for a non-directory as
part of extracting content, use RemoveAll() instead of Remove().

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-11-29 17:22:07 -05:00
OpenShift Merge Robot 2711b8557c
Merge pull request #3651 from flouthoc/accept-multiple-filters
images: accept multiple filter with logical `AND` between them.
2021-11-29 19:30:49 +01:00
Maximilien McDermott 2c366d1e54 Simple README fix
Signed-off-by: MaximUltimatum <mcder018@live.com>
2021-11-29 09:24:33 -06:00
Aditya Rajan dcc3fc36c0
images: accept multiple filter with logical AND
Already documented but a NOOP currently `buildah images` accepts a
single filter however it should accept multiple filters and perform a
logical `AND` between them while fetching images.

`buildah images --filter <1> --filter <2>`

Signed-off-by: Aditya Rajan <arajan@redhat.com>
2021-11-29 14:26:59 +05:30
OpenShift Merge Robot dc7625a807
Merge pull request #3647 from containers/dependabot/go_modules/github.com/containernetworking/cni-1.0.1
build(deps): bump github.com/containernetworking/cni from 0.8.1 to 1.0.1
2021-11-24 14:39:03 +01:00
dependabot[bot] 3a6fd31044
build(deps): bump github.com/containernetworking/cni from 0.8.1 to 1.0.1
Bumps [github.com/containernetworking/cni](https://github.com/containernetworking/cni) from 0.8.1 to 1.0.1.
- [Release notes](https://github.com/containernetworking/cni/releases)
- [Commits](https://github.com/containernetworking/cni/compare/v0.8.1...v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/containernetworking/cni
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-24 09:38:50 +00:00
OpenShift Merge Robot 8b79d8b077
Merge pull request #3618 from containers/dependabot/go_modules/github.com/onsi/gomega-1.17.0
build(deps): bump github.com/onsi/gomega from 1.16.0 to 1.17.0
2021-11-23 20:29:13 +01:00
OpenShift Merge Robot 8b6df9ac09
Merge pull request #3641 from rhatdan/VENDOR
UPdate vendor of container/storage
2021-11-23 19:36:14 +01:00
Daniel J Walsh 88274f586a
Merge branch 'main' into dependabot/go_modules/github.com/onsi/gomega-1.17.0 2021-11-23 08:56:23 -05:00
OpenShift Merge Robot 7ea81422fb
Merge pull request #3645 from rhatdan/localip
Make LocalIP public function so Podman can use it
2021-11-23 14:49:15 +01:00
Daniel J Walsh f13abea3c5
UPdate vendor of container/storage
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-23 07:46:55 -05:00
dependabot[bot] 7be6863e9f
build(deps): bump github.com/onsi/gomega from 1.16.0 to 1.17.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.16.0 to 1.17.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.16.0...v1.17.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-22 20:40:36 +00:00
OpenShift Merge Robot b768318674
Merge pull request #3646 from containers/dependabot/go_modules/github.com/containers/image/v5-5.17.0
build(deps): bump github.com/containers/image/v5 from 5.16.1 to 5.17.0
2021-11-22 21:23:30 +01:00
dependabot[bot] 6994eafa6a
build(deps): bump github.com/containers/image/v5 from 5.16.1 to 5.17.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.16.1 to 5.17.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.16.1...v5.17.0)

---
updated-dependencies:
- dependency-name: github.com/containers/image/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-22 16:58:30 +00:00
Daniel J Walsh 1d74137908
Make LocalIP public function so Podman can use it
[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-22 10:00:50 -05:00
OpenShift Merge Robot 78a1d08eba
Merge pull request #3640 from cevich/use_static_fedora-minimal
Tests should rely only on static/unchanging images
2021-11-19 23:29:41 +01:00
OpenShift Merge Robot bfe412b1c6
Merge pull request #3638 from rhatdan/unsetenv
Fix UnsetEnv for buildah bud
2021-11-19 20:53:13 +01:00
OpenShift Merge Robot ad21b94c7b
Merge pull request #3630 from nalind/label-pipes
run: ensure that stdio pipes are labeled correctly
2021-11-19 19:38:14 +01:00
Daniel J Walsh c9c5f546c6
Fix UnsetEnv for buildah bud
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-11-19 11:48:29 -05:00
Chris Evich d5b66920bd
Tests should rely only on static/unchanging images
Around 18th of Nov. 2021, a new/incompatible
`quay.io/libpod/fedora-minimal:latest` was pushed by the quay
auto-builder servicing the podman repo.  This caused a number of
problems across several branches.  To address this, the auto-builder was
disabled and a fixed F34 based image was tagged and pushed as both
`latest` and `34`.  However, all repositories which use this test image
need to be individually updated to reference it.

See https://github.com/containers/podman/pull/12343

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-11-19 10:58:44 -05:00
Nalin Dahyabhai 9b6a02f3af run: ensure that stdio pipes are labeled correctly
Label stdio pipes to ensure that processes we run can read through
/dev/stdin and write through the /dev/stdout and /dev/stderr links.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-11-19 10:55:50 -05:00
OpenShift Merge Robot e6f732096c
Merge pull request #3636 from containers/dependabot/go_modules/github.com/docker/docker-20.10.11incompatible
build(deps): bump github.com/docker/docker from 20.10.10+incompatible to 20.10.11+incompatible
2021-11-19 16:42:16 +01:00