Commit Graph

5728 Commits

Author SHA1 Message Date
Chris Evich be74b733fc
Fix issue/pr lock workflow
Followup to https://github.com/containers/podman/pull/22304

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-04-09 16:25:01 -04:00
openshift-merge-bot[bot] dd7c1d5ce8
Merge pull request #5459 from flouthoc/fix-heredoc-copy
heredoc: honor inline `COPY` irrespective of `.containerignore` file
2024-04-09 18:08:21 +00:00
Chris Evich a99fe15134 [CI:DOCS] Add golang 1.21 update warning
This is needed on the off-chance that some tool or a human suggests
updating the minimum version to 1.21 or later. Since doing so would
cause Fedora and Debian to start behaving differently WRT builds.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-04-05 19:44:16 -04:00
flouthoc 77400c4fc2
heredoc: honor inline COPY irrespective of ignorefiles
If we are copying heredoc files, we need to temporary place
them in the context dir and then move to container via copier
there are cases where .containerignore can have a patterns like
which can match our heredoc files so let's not set any excludes
or IgnoreFile for this copy.

Closes: https://github.com/containers/buildah/issues/5391

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2024-04-05 07:55:47 -07:00
Daniel J Walsh 062e6f62ab
Merge pull request #5457 from onlykzy/patch-1
Update install.md
2024-04-04 11:22:14 -04:00
openshift-merge-bot[bot] dc99fbe888
Merge pull request #5454 from flouthoc/digestfile-source
source-push: add support for `--digestfile`
2024-04-03 17:23:19 +00:00
onlykzy ff13a08c9d
Update install.md
Signed-off-by: onlykzy <38772072+onlykzy@users.noreply.github.com>
2024-04-03 20:45:30 +08:00
openshift-merge-bot[bot] 45bbc1fd04
Merge pull request #5445 from aaronlehmann/mount-stage-cache-from
Fix caching when mounting a cached stage with COPY/ADD
2024-04-03 11:58:47 +00:00
flouthoc 5b414ad08f
source-push: add support for --digestfile
Allow writing digest of the pushed source to the specified `digestfile`

Closes: https://github.com/containers/buildah/issues/5399

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2024-04-02 15:13:52 -07:00
Aaron Lehmann d9129b463d Fix caching when mounting a cached stage with COPY/ADD
A comment states that avoidLookingCache is set when a previous stage
that executed as part of the build is referenced by --mount, to avoid
reusing content from an older build of the stage:

    // Only attempt to find cache if its needed, this part
    // so that if a step is using RUN --mount and mounts
    // previous stages then it uses the freshly built stage
    // of re-using the older stage from the store.

However, stages consisting of COPY/ADD seem to be flagged with
didExecute even if they were fetched from cache instead. I believe
this is an oversight, and these stages should not prevent subsequent
caching.

Also, avoidLookingCache would prevent a cache push, but I think it
should only prevent cache lookups, since populating the cache is still
useful in these caess.

It's very possible I'm misunderstanding something, but I believe the
RUN step in test case I've added wrongly skips cache, and I'd appreciate
some pointers in the right direction if what I've proposed here isn't
the right solution.

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
2024-04-02 12:57:58 -07:00
openshift-merge-bot[bot] cb2e044848
Merge pull request #5446 from rahilarious/softcode-strip
Makefile: softcode `strip`, use it from env var
2024-04-01 15:55:32 +00:00
openshift-merge-bot[bot] 1ad7511d26
Merge pull request #5430 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.1
2024-04-01 15:41:47 +00:00
openshift-merge-bot[bot] f9a84a2454
Merge pull request #5447 from containers/renovate/github.com-containers-luksy-digest
fix(deps): update github.com/containers/luksy digest to 3d2cf0e
2024-04-01 15:39:03 +00:00
openshift-merge-bot[bot] f8cdb7dc2f
Merge pull request #5443 from nalind/cdi
Add support for passing CDI specs to --device
2024-04-01 15:36:19 +00:00
renovate[bot] 58579ba656
fix(deps): update github.com/containers/luksy digest to 3d2cf0e
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-01 04:48:39 +00:00
Rahil Bhimjiani 2cd31a0698
Makefile: softcode `strip`, use it from env var
Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
2024-04-01 09:25:21 +05:30
Nalin Dahyabhai f812c89496 Man page updates
Describe --device in `buildah from` and `buildah run`, where it's new.
Update the description of --device in `buildah build` to note that the
device nodes are only there while RUN instructions are being run, and
not to imply that they end up in the finished image.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-03-29 16:57:11 -04:00
Nalin Dahyabhai 5198af7d7c Add support for passing CDI specs to --device
Add support for using CDI to resolve `--device` devices for RUN
instructions during `buildah build`, `buildah from`, and `buildah run`,
as `podman run` does.

This generally requires that we stop resolving device specifications
(arguments passed to --device) earlier and deferring that until it's
time to run a process, because CDI wants to pick over those values,
modify a runtime spec to set up the ones that it knows about, and then
hand back the list of values that it doesn't know about.

We don't want to do a dry run of this during CLI processing because that
would create a window where the underlying hardware state could change,
and that could produce some hard-to-diagnose errors.

Being able to test this is going to require that we add the `--device`
flag to `buildah run` (`--security-opt` affects how we build the
container's layer, so it has to be done at `buildah from`).

The default configured devices list is pulled in by CLI flag processing
during `buildah from` and `buildah build`, so it doesn't also need to be
explicitly passed to `buildah run` or the internal Run() method.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-03-29 16:57:10 -04:00
Nalin Dahyabhai 14bf3db27a Update comments on some API objects
Avoid generically referring to "the container" where it can be ambiguous
that we're actually talking about the environment we set up for running
a command for a RUN instruction or Run() call.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-03-28 17:24:38 -04:00
Nalin Dahyabhai 2a7ff9905e pkg/parse.DeviceFromPath(): dereference src symlinks
When the passed-in source location is a symbolic link, dereference it,
because the documentation says that's what we do.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2024-03-28 17:24:38 -04:00
openshift-merge-bot[bot] 39ea15cedd
Merge pull request #5436 from rahilarious/main
Makefile - instead of calling `as` directly, use it from env var
2024-03-27 21:17:16 +00:00
Rahil Bhimjiani c1b43b57bb
Makefile - instead of calling `as` directly, use it from env var
Signed-off-by: Rahil Bhimjiani <me@rahil.rocks>
2024-03-27 14:33:52 +05:30
renovate[bot] 23b8d9767a
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-24 15:19:34 +00:00
openshift-merge-bot[bot] e3c8c0e649
Merge pull request #5426 from edsantiago/new-vms
CI: bump VMs
2024-03-21 07:13:43 +00:00
Ed Santiago c1119f8865 CI: bump VMs
* pasta 2024-03-20 on all Fedoras
* crun 1.14.4 everywhere

See https://github.com/containers/automation_images/pull/337#issuecomment-2010128930

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-03-20 14:03:03 -06:00
openshift-merge-bot[bot] 8afe75dd5c
Merge pull request #5418 from containers/renovate/github.com-docker-docker-25.x
fix(deps): update module github.com/docker/docker to v25.0.5+incompatible
2024-03-20 05:32:38 +00:00
openshift-merge-bot[bot] dffd83424a
Merge pull request #5412 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.0
2024-03-20 05:30:04 +00:00
renovate[bot] 2c47fdccd7
fix(deps): update module github.com/docker/docker to v25.0.5+incompatible
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-19 22:11:24 +00:00
openshift-merge-bot[bot] cab0e936bd
Merge pull request #5415 from TomSweeneyRedHat/dev/tsweeney/addcomment1
Change RUN to comment in bud.bats
2024-03-19 09:17:13 +00:00
openshift-merge-bot[bot] 07fb7d7c18
Merge pull request #5414 from cevich/slow_down_renovate
[CI:DOCS] Stop rebasing renovate PRs automatically
2024-03-18 21:43:52 +00:00
renovate[bot] f95b7a1884
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.17.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-18 19:27:58 +00:00
tomsweeneyredhat 9cf83d8f8d Change RUN to comment in bud.bats
Just before merging #5411, a comment was made
about changing a RUN command to a comment.  This
completes that.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-03-18 15:27:27 -04:00
Daniel J Walsh e64e6cc09d
Merge pull request #5411 from TomSweeneyRedHat/dev/tsweeney/cve-main
CVE-2024-1753 container escape fix
2024-03-18 15:24:59 -04:00
Chris Evich 5808b96033
Stop rebasing renovate PRs automatically
Whenever a PR's target branch moves, Renovate was reconfigured to rebase
all of it's PRs and re-run CI.  This is annoying for developers, stop
it.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-03-18 15:24:49 -04:00
Chris Evich 37994356f8
Update renovate validation image
The one from github's container registry won't hit docker rate-limits.

Signed-off-by: Chris Evich <cevich@redhat.com>
2024-03-18 15:23:35 -04:00
tomsweeneyredhat 4304d618f3 CVE-2024-1753 container escape fix
Addresses CVE-2024-1753 which allowed a user to write files to the
`/` directory of the host machine if selinux was not enabled.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-03-18 15:21:53 -04:00
openshift-merge-bot[bot] e51411590d
Merge pull request #5409 from Luap99/pasta-result
fix /etc/hosts and resolv.conf setup with network configs
2024-03-18 19:20:55 +00:00
openshift-merge-bot[bot] ccde5d569f
Merge pull request #5402 from Pvlerick/build-doc-link-fix
fix links to containerignore doc
2024-03-18 13:42:39 +00:00
Paul Holzinger 516f9e9a24
correctly configure /etc/hosts and resolv.conf when using network
Previously buildah may have created a incorrect hosts/resolv.conf file,
when netavark, slirp4netns or pasta are used we have to actually
consider their special setup and use the correct nameservers.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-18 14:38:01 +01:00
Paul Holzinger 9db5a16f7d
buildah: refactor resolv/hosts setup.
We should never configure the files before we setup the network as we
are missing a lot of information. This is part 1 of the refactor where
we split the functions between create/add entries part. See the
following commit to actualy see how me make use of this.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-18 14:37:32 +01:00
Paul Holzinger 8c1fee7e75
rename the hostFile var to reflect the value better
I got confused a bit there so make it clearer to readers that both are
different.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-18 14:37:32 +01:00
Paul Holzinger f8a7841cc0
vendor latest c/common
Includes new pasta functionality.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-03-18 14:37:19 +01:00
openshift-merge-bot[bot] 0b11148f27
Merge pull request #5410 from lsm5/vendored-provides
[skip-ci] rpm: use go-rpm-macros supported vendoring
2024-03-18 13:20:39 +00:00
Lokesh Mandvekar 26da74d54e
[skip-ci] rpm: use go-rpm-macros supported vendoring
This removes the need for any `Provides: bundled()` we needed in spec
files.

The updated Provides will be visible in the build logs and can also be
verified with `rpm -q --provides $RPM_FILE`.

Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
2024-03-18 17:24:55 +05:30
Philippe Vlérick 547d9bf0e5
Update docs/buildah-add.1.md
Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
Signed-off-by: Philippe Vlérick <pvlerick@gmail.com>
2024-03-18 08:23:50 +01:00
openshift-merge-bot[bot] 1acd44390f
Merge pull request #5377 from containers/renovate/github.com-onsi-ginkgo-v2-2.x
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.16.0
2024-03-17 12:38:14 +00:00
renovate[bot] 80f9f7cb08
fix(deps): update module github.com/onsi/ginkgo/v2 to v2.16.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-16 14:51:41 +00:00
Daniel J Walsh 6bac78ff65
Merge pull request #5396 from containers/renovate/go-gopkg.in/go-jose/go-jose.v2-vulnerability
chore(deps): update module gopkg.in/go-jose/go-jose.v2 to v2.6.3 [security]
2024-03-16 10:46:39 -04:00
Daniel J Walsh eb03dd439e
Merge pull request #5397 from containers/renovate/github.com-containers-ocicrypt-1.x
fix(deps): update module github.com/containers/ocicrypt to v1.1.10
2024-03-16 10:46:22 -04:00
Daniel J Walsh ca01f9f234
Merge pull request #5387 from containers/renovate/github.com-docker-docker-25.x
fix(deps): update module github.com/docker/docker to v25.0.4+incompatible
2024-03-16 10:45:58 -04:00