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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>