Commit Graph

3780 Commits

Author SHA1 Message Date
tomsweeneyredhat 97ba8c1bb2 Bump to v1.25.0-dev
[NO TESTS NEEDED]

As the title says.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-01-26 16:52:23 -05:00
tomsweeneyredhat 29f6b4f706 Bump to v1.24.0
[NO TESTS NEEDED]

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-01-26 16:48:03 -05:00
OpenShift Merge Robot c32eb8b0c0
Merge pull request #3751 from rhatdan/VENDOR
Update vendor of containers/common
2022-01-26 21:50:15 +01:00
OpenShift Merge Robot 1d6348bc09
Merge pull request #3749 from containers/dependabot/go_modules/tests/tools/github.com/golangci/golangci-lint-1.44.0
build(deps): bump github.com/golangci/golangci-lint from 1.43.0 to 1.44.0 in /tests/tools
2022-01-26 19:32:13 +01:00
OpenShift Merge Robot 7fc46fca02
Merge pull request #3713 from abergmeier/systemflag
Allow processing of SystemContext from FlagSet
2022-01-26 18:36:15 +01:00
Daniel J Walsh 61579f4c83
Merge pull request #3745 from eriksjolund/fix_typos_and_improve_language
[CI:DOCS] Fix typos and improve language
2022-01-26 12:35:20 -05:00
Daniel J Walsh a486cf31c7
Update vendor of containers/common
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-26 12:32:43 -05:00
OpenShift Merge Robot 7ba1386ee8
Merge pull request #3744 from cevich/notify_on_error
[CI:DOCS] Github-workflow: Report both failures and errors.
2022-01-26 17:12:17 +01:00
dependabot[bot] f3fb228ca7
build(deps): bump github.com/golangci/golangci-lint in /tests/tools
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.43.0 to 1.44.0.
- [Release notes](https://github.com/golangci/golangci-lint/releases)
- [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/golangci/golangci-lint/compare/v1.43.0...v1.44.0)

---
updated-dependencies:
- dependency-name: github.com/golangci/golangci-lint
  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>
2022-01-26 10:57:59 -05:00
Chris Evich 34bc00afec
Github-workflow: Report both failures and errors.
Port of changes from https://github.com/containers/podman/pull/12997 and
https://github.com/containers/podman/pull/13005 to the workflow in this
repository.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-01-26 10:13:42 -05:00
OpenShift Merge Robot 30d1340ada
Merge pull request #3747 from containers/dependabot/go_modules/github.com/containers/image/v5-5.19.0
build(deps): bump github.com/containers/image/v5 from 5.18.0 to 5.19.0
2022-01-26 13:38:41 +01:00
dependabot[bot] 637e12625a
build(deps): bump github.com/containers/image/v5 from 5.18.0 to 5.19.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.18.0 to 5.19.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.18.0...v5.19.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>
2022-01-26 09:10:02 +00:00
OpenShift Merge Robot bed25d00cc
Merge pull request #3720 from Luap99/networks
buildah build --network add support for custom networks
2022-01-25 19:47:44 -05:00
Daniel J Walsh d92da92e4d
Update docs/buildah-build.1.md
Co-authored-by: Tom Sweeney <tsweeney@redhat.com>
2022-01-25 19:43:32 -05:00
Erik Sjölund 76e9dbf8a6 [CI:DOCS] Fix typos and improve language
Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2022-01-25 21:55:55 +01:00
Paul Holzinger 08d636a28b
buildah bud --network add support for custom networks
The backend logic already supports specifying custom network names. This
only adds the support for the frontend parsing.

Fixes containers/podman#12282

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-01-25 21:02:43 +01:00
OpenShift Merge Robot 350a835a0f
Merge pull request #3735 from TomSweeneyRedHat/dev/tsweeney/fixpull2
Make pull commands be consistent
2022-01-25 13:33:43 -05:00
tomsweeneyredhat 8c250d495d Make pull commands be consistent
Per @edsantiago 's suggestion, make the pull commands consistent, always
accepting a value.  Currently we have:

--pull
--pull=true
--pull=false
--pull-never
--pull-always

With this changes, we will only have pull with a variety of options,
ala:

--pull
--pull=true
--pull=false
--pull=never
--pull=always

For backward compatibility, the --pull-never and --pull-always
options will remain operational, however they are not documented
and are conisdered deprecated.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-01-25 12:13:44 -05:00
OpenShift Merge Robot 6c61d9d77f
Merge pull request #3743 from nalind/build-v
docs/buildah-build.1.md: don't imply that -v isn't just a RUN thing
2022-01-25 10:39:46 -05:00
Nalin Dahyabhai 652a8e1a52 docs/buildah-build.1.md: don't imply that -v isn't just a RUN thing
The current wording doesn't clearly state that volumes specified using
-v are only a factor when executing RUN instructions.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2022-01-24 17:24:43 -05:00
OpenShift Merge Robot 718f2b4439
Merge pull request #3736 from containers/dependabot/go_modules/github.com/onsi/gomega-1.18.0
build(deps): bump github.com/onsi/gomega from 1.17.0 to 1.18.0
2022-01-24 13:44:44 -05:00
dependabot[bot] 3b8de06434
build(deps): bump github.com/onsi/gomega from 1.17.0 to 1.18.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.17.0 to 1.18.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.17.0...v1.18.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>
2022-01-24 09:17:15 +00:00
Daniel J Walsh 3b16a70308
Merge branch 'main' into systemflag 2022-01-21 13:25:31 -05:00
OpenShift Merge Robot 2189882aeb
Merge pull request #3732 from rhatdan/codespell
Run codespell on code
2022-01-21 13:23:27 -05:00
OpenShift Merge Robot 9c2f1a741b
Merge pull request #3727 from rhatdan/VENDOR
Vendor in latest containers/common
2022-01-21 10:49:30 -05:00
Daniel J Walsh 79a3808366
Vendor in latest containers/image
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-21 09:19:56 -05:00
OpenShift Merge Robot b6f6306231
Merge pull request #3715 from flouthoc/overlay-extend-api
overlay, mount: add support for non-volatile `upperdir`, `workdir` for overlay volumes
2022-01-21 07:37:26 -05:00
Daniel J Walsh 1267508918
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-21 06:59:49 -05:00
OpenShift Merge Robot 2030d0bd28
Merge pull request #3723 from kolyshkin/tests-tools-bump
Tests tools bump
2022-01-20 15:17:29 -05:00
Kir Kolyshkin 8b190feaca .github/dependabot.yml: add tests/tools go.mod
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-20 10:41:15 -08:00
Kir Kolyshkin 2ed476d2b7 CI: rm git-validation, add GHA job to validate PRs
Currently, git-validation is used to do two things:
1. Check that all commits in a PR has DCO (Signed-off-by)
2. Check that all commits has limited subject length

Nowdays, there are better tools for that. For DCO,
https://github.com/apps/dco can be used, and for subject length check, I
mocked up a GHA CI job (originally in opencontainers/runc -- copied from
there with some minimal changes).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-20 10:41:15 -08:00
Kir Kolyshkin 7d7617670c tests/tools: bump go-md2man to v2.0.1
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-20 10:41:15 -08:00
Kir Kolyshkin 69ea563256 tests/tools/Makefile: simplify
1. Remove GO111MODULE=on and -mod=vendor. Those are not required
   (default) since go 1.16 (or earlier), and go 1.16 is currently
   the oldest supported release.

2. Remove go-build define:
   - cd `pwd` does not make any sense;
   - @echo > /dev/null masks any errors during tools building;
   - $(shell basename ...) could be replaced by $(notdir ...);
   - the above is not needed since we already have what we need
     as a target ($@);
   - finally, this is problematic for e.g. cpuguy83/go-md2man/v2
     (as it builds the binary named v2).

   So, just use $(GO_BUILD) -o $@ path/to/package

3. GO_BUILD does not need to be exported.

4. Mark $(BUILDDIR) target as phony -- a mere existence of the directory
   should not cause make to skip building the binaries.

K.I.S.S!

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-20 10:41:15 -08:00
Kir Kolyshkin 7ab2e438e4 tests/tools: bump onsi/ginkgo to v1.16.5
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-20 10:41:15 -08:00
OpenShift Merge Robot eea866a186
Merge pull request #3724 from giuseppe/fix-runtime-lookup
linux: fix lookup for runtime
2022-01-20 11:09:30 -05:00
Aditya R 685121b27f
vendor: bump c/common and others
Signed-off-by: Aditya R <arajan@redhat.com>
2022-01-20 21:35:43 +05:30
Aditya R 316e34d268
mount: add support for custom upper and workdir with overlay mounts
Allow users to specify non-volatile `upper` and `workdir` with overlay
mounts.

Usage

```console
buildah from alpine
buildah run -v /something/lower:/test:z,O,upperdir=/somewhere/upperdir,workdir=/somwhere/workdir alpine-working-container cat /test/hello
```

Signed-off-by: Aditya R <arajan@redhat.com>
2022-01-20 21:35:34 +05:30
Giuseppe Scrivano e02e273820
linux: fix lookup for runtime
lookup the full runtime path instead of using its name.

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

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-01-20 10:53:36 +01:00
Aditya Rajan db6943a170
overlay: add MountWithOptions to API which extends support for advanced overlay
Expose `MountWithOptions` for overlay which allows users to pass more
verbose configuration for overlay mounts.

For instance `upperdir, workerdir` and in future `volatile`.

Signed-off-by: Aditya R <arajan@redhat.com>
2022-01-20 14:54:02 +05:30
OpenShift Merge Robot 4b3aaeecb6
Merge pull request #3717 from kolyshkin/lint
Update golangci-lint, its config, and fix some warnings
2022-01-19 10:51:04 -05:00
Andreas Bergmeier ea0506a494 Allow processing of SystemContext from FlagSet
In situations where you don't want/need Cobra climbing behavior nor
Cobra at all using FlagSet is the easier sell.

Signed-off-by: Andreas Bergmeier <abergmeier@gmx.net>
2022-01-18 22:48:37 +01:00
Kir Kolyshkin acbe301438 .golangci.yml: enable unparam linter
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 13:33:58 -08:00
Kir Kolyshkin 0b86b16163 util/resolveName: rm bool return
As pointed out by unparam linter, the bool returned by resolveName is
never used (at least since commit e1444dd71e).

Also, since commit dcd2a92e56, resolveName is no longer public.

Remove the bool and the code which calculates it.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 13:33:58 -08:00
Kir Kolyshkin 8c14d40c4b tests/tools: bump golangci-lint
... and its dependencies.

Also, modify .golangci.yml since new golangci-lint no longer have some
of the linters mentioned. Besides, it is unsafe to enable all linters,
because (1) not all linters are good/useful; (2) new golangci-lint
releases can bring more linters and thus more CI issues. Instead, use
the default set of linters, plus enable a few more:

 * revive (which replaces golint)
 * unconvert

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 13:33:47 -08:00
Kir Kolyshkin 7e691dc170 .gitignore: fixups
Commit 3a122aa3c added ignoring any file or directory named result,
which is wrong. What it meant to do is to ignore top-level result
directory. Fix accordingly.

Same for tests/tools -- this is meant to be the top-level directory
only.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 13:32:01 -08:00
Kir Kolyshkin 3d93408a06 all: fix capabilities.NewPid deprecation warnings
Since commit 3eef1ed0bd (January 2019) using
capabilities.NewPid() is deprecated.

Replace with NewPid2().

Note that in chroot/run.go we used to load then clear all capabilities
bits. With NewPid2, this is no longer needed -- we do not load caps, so
there is no need to clear.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 12:56:35 -08:00
Kir Kolyshkin 55d55bc773 bind/mount.go: fix linter comment
Newer golangci-lint does not understand the nolint: directive
because it is followed by some comment.

To fix, add a comment before the (human) comment.

While at it, remove the space after // since comments targeted for
non-humans should not have space (this is currently not enforced by
golangci-lint).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 12:56:35 -08:00
Kir Kolyshkin b03327d2a4 all: fix gosimple warning S1039
AKA "unnecessary use of fmt.Sprintf (gosimple)"

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 12:56:34 -08:00
Kir Kolyshkin 3c65f17233 tests/e2e/buildah_suite_test.go: fix gosimple warnings
> tests/e2e/buildah_suite_test.go:166:27: S1025: the argument's underlying type is a slice of bytes, should use a simple conversion instead of fmt.Sprintf (gosimple)
> 	fields := strings.Fields(fmt.Sprintf("%s", s.Out.Contents()))
> 	                         ^
> tests/e2e/buildah_suite_test.go:173:12: S1025: the argument's underlying type is a slice of bytes, should use a simple conversion instead of fmt.Sprintf (gosimple)
> 	output := fmt.Sprintf("%s", s.Out.Contents())
> 	          ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 12:56:34 -08:00
Kir Kolyshkin b9749f8f05 imagebuildah/executor.go: fix gosimple warning
Fix the following warning:

> 	imagebuildah/executor.go:307:6: S1033: unnecessary guard around call to delete (gosimple)
>						if _, stillUnused := exec.unusedArgs[list[0]]; stillUnused {
>						^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2022-01-18 12:56:34 -08:00