Commit Graph

2448 Commits

Author SHA1 Message Date
Paul Holzinger 71ba2e4ef0 Shell Completion for podman build flags
The PR containers/podman#6442 enables a new way to create
shell completions scripts. The shell completion is handled
by cobra and since the build flags are defined here
the completion functions for this should be defined here
as well. For Reference see:
https://github.com/spf13/cobra/blob/master/shell_completions.md

I added a unit test to ensure that the flags have a
completion function set.

These completions could also be used by buildah if someone
wants to implements this cobra completion logic for buildah.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-01 17:45:43 +02:00
Paul Holzinger 6348eb3a0e Bump c/common to v0.24.0
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-10-01 17:45:43 +02:00
bors[bot] 7fb1282932
Merge #2659
2659: add: preserve ownerships and permissions on ADDed archives r=vrothberg a=nalind

#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

When extracting archives that are added using ADD, don't override permissions and ownership information.  We regressed on this when we switched to using the copier package to handle them.

#### How to verify it

Added a new conformance test for it.

#### Which issue(s) this PR fixes:

Fixes #2657.

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```
Permissions and ownership information on the contents of archives added using the ADD instruction or "buildah add" on the command line should be preserved again.
```

Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-30 11:05:28 +00:00
Nalin Dahyabhai c1a1805ee8 add: preserve ownerships and permissions on ADDed archives
When extracting archives that are added using ADD, don't override
permissions and ownership information.  We regressed on this when we
switched to using the copier package to handle them.

Add a conformance test to prevent regressions on this.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-29 16:25:31 -04:00
bors[bot] 5955652650
Merge #2614
2614: Add a few tests of push command r=rhatdan a=hshiina

The following tests are added.
- `--authfile` flag with an existing file
- `--quiet` flag

Signed-off-by: Hironori Shiina <shiina.hironori@fujitsu.com>

<!--
Thanks for sending a pull request!

Please make sure you've read and understood our contributing guidelines
(https://github.com/containers/buildah/blob/master/CONTRIBUTING.md) as well as ensuring
that all your commits are signed with `git commit -s`.
-->

#### What type of PR is this?

<!--
Please label this pull request according to what type of issue you are
addressing, especially if this is a release targeted pull request.

Uncomment only one `/kind <>` line, hit enter to put that in a new line, and
remove leading whitespace from that line:
-->
/kind other

#### What this PR does / why we need it:
This PR adds a few tests for `push` command:
 - `--authfile` flag with an existing file
 - `--quiet` flag

#### How to verify it
Run `bats tests/push.bats`.

#### Which issue(s) this PR fixes:
None

<!--
Automatically closes linked issue when PR is merged.
Uncomment the following comment block and include the issue
number or None on one line.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`, or `None`.
-->

<!--
Fixes #
or
None
-->

#### Special notes for your reviewer:
None

#### Does this PR introduce a user-facing change?
<!--
If no, just write `None` in the release-note block below. If yes, a release note
is required: Enter your extended release note in the block below. If the PR
requires additional action from users switching to the new release, include the
string "action required".

For more information on release notes please follow the kubernetes model:
https://git.k8s.io/community/contributors/guide/release-notes.md
-->

```release-note
None
```



Co-authored-by: Hironori Shiina <shiina.hironori@fujitsu.com>
2020-09-25 20:54:20 +00:00
bors[bot] b3f6ed83a5
Merge #2644
2644: chroot: fix handling of errno seccomp rules r=rhatdan a=nalind

#### What type of PR is this?

/kind bug
#### What this PR does / why we need it:

When converting seccomp rules from the runtime spec to the structure that we can feed to libseccomp, combine the prescribed errno value with the action when we're mapping the "return an errno" action from one to the other.

#### How to verify it

Currently, chroot isolation hits an error processing this seccomp rule:
```
                {
                        "names": [
                                "socket"
                        ],
                        "action": "SCMP_ACT_ERRNO",
                        "args": [
                                {
                                        "index": 0,
                                        "value": 16,
                                        "valueTwo": 0,
                                        "op": "SCMP_CMP_EQ"
                                },
                                {
                                        "index": 2,
                                        "value": 9,
                                        "valueTwo": 0,
                                        "op": "SCMP_CMP_EQ"
                                }
                        ],
                        "comment": "",
                        "includes": {},
                        "excludes": {
                                "caps": [
                                        "CAP_AUDIT_WRITE"
                                ]
                        },
                        "errnoRet": 22
                },
```
on Fedora 33.

#### Which issue(s) this PR fixes:

None

#### Special notes for your reviewer:

Definitely going to need to backport this to older branches.

#### Does this PR introduce a user-facing change?

```
None
```



Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-25 08:44:08 +00:00
bors[bot] 90a5ba5408
Merge #2650
2650: Bump containers/common to v0.23.0 r=rhatdan a=Luap99


<!--
Thanks for sending a pull request!

Please make sure you've read and understood our contributing guidelines
(https://github.com/containers/buildah/blob/master/CONTRIBUTING.md) as well as ensuring
that all your commits are signed with `git commit -s`.
-->

#### What type of PR is this?

<!--
Please label this pull request according to what type of issue you are
addressing, especially if this is a release targeted pull request.

Uncomment only one `/kind <>` line, hit enter to put that in a new line, and
remove leading whitespace from that line:
-->

> /kind api-change
> /kind bug
> /kind cleanup
> /kind deprecation
> /kind design
> /kind documentation
> /kind failing-test 
> /kind feature
> /kind flake
> /kind other

#### What this PR does / why we need it:

#### How to verify it

#### Which issue(s) this PR fixes:

<!--
Automatically closes linked issue when PR is merged.
Uncomment the following comment block and include the issue
number or None on one line.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`, or `None`.
-->
Closes #2648 
<!--
Fixes #
or
None
-->

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

<!--
If no, just write `None` in the release-note block below. If yes, a release note
is required: Enter your extended release note in the block below. If the PR
requires additional action from users switching to the new release, include the
string "action required".

For more information on release notes please follow the kubernetes model:
https://git.k8s.io/community/contributors/guide/release-notes.md
-->

```release-note
Allow users to specify the default format for image builds in containers.conf
```



Co-authored-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-25 08:09:04 +00:00
bors[bot] 2d715d182d
Merge #2652
2652: Makefile: tweak the cross-compile target r=TomSweeneyRedHat a=nalind

#### What type of PR is this?

/kind cleanup

#### What this PR does / why we need it:

What `go tool dist list` says the toolchain supports changes, so this change removes these attempted cross-compile build targets.
* GOOS=darwin, GOARCH unspecified build
* GOOS=darwin, GOARCH=386 build

Replace our use of slices of github.com/opencontainers/runc/libcontainer/configs.Device structures with a locally-defined type alias so that we can avoid importing the package on non-Unixy systems.  The result is not going to be a very useful binary on non-Linux systems, but it helps ensure that our subpackages won't break compilation for other projects who consume us as a library.

#### How to verify it

CI all the way.

#### Which issue(s) this PR fixes:

None

#### Special notes for your reviewer:

Don't try to actually run the non-Linux binaries.

#### Does this PR introduce a user-facing change?

```
None
```

Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-24 19:31:36 +00:00
Nalin Dahyabhai bf41a3d707 Makefile: tweak the cross-compile target
What `go tool dist list` says the toolchain supports changes, so this
change removes these attempted cross-compile build targets.
* GOOS=darwin, GOARCH unspecified
* GOOS=darwin, GOARCH=386

Replace our use of slices of
github.com/opencontainers/runc/libcontainer/configs.Device structures
with a locally-defined type alias so that we can avoid importing the
package on non-Unixy systems.  The result is not going to be a very
useful binary on non-Linux systems, but it helps ensure that our
subpackages won't break compilation for other projects who consume us as
a library.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-24 12:09:48 -04:00
Paul Holzinger cca4cb73f2 Bump containers/common to v0.23.0
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-09-24 15:36:41 +02:00
bors[bot] 8e61adcd8d
Merge #2646
2646: chroot: create bind mount targets 0755 instead of 0700 r=rhatdan a=nalind

#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

When running using chroot isolation, create the target mountpoints for bind mounts, when they don't already exist, with 0755 permissions, for better consistency with runc.

#### How to verify it

Build an image derived from an image that doesn't include a `/dev`, for example `registry.suse.co/suse/sles12sp4@sha256:7504649ba71f61492c309ccada877a47ea11272b8658a9ad52923e8d17204628`, using chroot isolation, and examine the layers in the image we produce, comparing the permissions on `/dev`, `/proc`, and `/sys` for inconsistencies.

#### Which issue(s) this PR fixes:

None

#### Special notes for your reviewer:

Running conformance tests with different types of isolation would give us a chance to catch this, but I really don't have a strong feeling for whether or not we want to effectively run all of the tests twice every time to be sure.

#### Does this PR introduce a user-facing change?

```
None
```

Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-24 13:25:42 +00:00
bors[bot] d8204183c1
Merge #2645
2645: Change call to Split() to safer SplitN() r=rhatdan a=TomSweeneyRedHat

Change calls to Split to SplitN when we are splitting on an "=" sign to make sure
we're not over chopping what the caller requested.

I started this search after seeing https://github.com/containers/podman/pull/7759.
I'll do similar for Podman, but initial results on my search is order of
magnitudes bigger there.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Co-authored-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-09-24 10:19:08 +00:00
Nalin Dahyabhai 533bf95d1e chroot: create bind mount targets 0755 instead of 0700
Create the target mountpoints for bind mounts, when they don't already
exist, with 0755 permissions, for better consistency with runc.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-23 19:41:28 -04:00
TomSweeneyRedHat bbd82c03c7 Change call to Split() to safer SplitN()
Change calls to Split to SplitN when we are splitting on an "=" sign to make sure
we're not over chopping what the caller requested.

I started this search after seeing https://github.com/containers/podman/pull/7759.
I'll do similar for Podman, but initial results on my search is order of
magnitudes bigger there.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-09-23 18:10:52 -04:00
Nalin Dahyabhai ecb40a48b4 chroot: fix handling of errno seccomp rules
When converting seccomp rules from the runtime spec to the structure
that we can feed to libseccomp, combine the prescribed errno value with
the action when we're mapping the "return an errno" action from one to
the other.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-23 18:06:58 -04:00
bors[bot] 0e06e45ae1
Merge #2622
2622: Warn when setting healthcheck in OCI format r=rhatdan a=ashley-cui

Signed-off-by: Ashley Cui <acui@redhat.com>

#### What type of PR is this?
/kind other

#### What this PR does / why we need it:
Healthcheck only works in Docker format, so when healthcheck is set in OCI format, warn user that it will be discarded
#### How to verify it

#### Which issue(s) this PR fixes:
Fixes: https://github.com/containers/buildah/issues/2388




Co-authored-by: Ashley Cui <acui@redhat.com>
2020-09-21 21:44:13 +00:00
bors[bot] f2f857acb6
Merge #2640
2640: build(deps): bump github.com/containers/image/v5 from 5.5.2 to 5.6.0 r=rhatdan a=dependabot-preview[bot]

Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.5.2 to 5.6.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/containers/image/releases">github.com/containers/image/v5's releases</a>.</em></p>
<blockquote>
<h2>v5.6.0</h2>
<ul>
<li>When we can't store signatures, point the user at the destination.</li>
<li>Update for <a href="https://github-redirect.dependabot.com/containers/skopeo/issues/932">containers/skopeo#932</a></li>
<li>Refactor configPath API</li>
<li>Load the rootless registries.conf.d for override</li>
<li>docker config: clean up after test</li>
<li>blobinfocache: clean up after test</li>
<li>enable search using pagination</li>
<li>pkg/docker/config: correct default file mode when create auth.json file</li>
<li>Update to Go 1.13</li>
<li>Coverity found potential nil dereference</li>
<li>Look for normalized paths in tarfile.</li>
<li>Move docker/tarfile.Destination to docker/internal/tarfile.Destination</li>
<li>Use the docker/internal/tarfile.Destination from docker/daemon and docker/archive</li>
<li>Remove deprecated non-SystemContext functions from docker/internal.tarfile</li>
<li>Introduce Destination.configPath and Destination.physicalLayerPath</li>
<li>Split docker/internal.tarfile.Writer from Destination</li>
<li>Move createRepositoriesFile to a bit better place</li>
<li>Split Writer.createManifest from Destination.PutManifest</li>
<li>Reorganize docker/internal/tarfile.Writer.createManifest a bit</li>
<li>Move the computation of layerPaths in docker-archive</li>
<li>Implement writing multiple images in the modern format.</li>
<li>Split createSingleLegacyLayer from writeLegacyLayerMetadata</li>
<li>Move legacy layer ID computation to a bit later</li>
<li>Merge writeLegacyMetadata and createRepositoriesFile</li>
<li>Implement writing multiple images in the legacy format</li>
<li>Separate tarfile.Writer creation from Destination creation</li>
<li>Lock docker/internal/tarfile.Writer to support concurrent uses</li>
<li>Split openArchiveForWriting from docker/archive/newImageDestination</li>
<li>Finally, introduce docker/archive.Writer</li>
<li>use container/storage/pkg/homedir</li>
<li>Fix an error message on docker-archive:path:name@sha256:$digest</li>
<li>Move docker/tarfile.Source to docker/internal/tarfile.Source</li>
<li>Use the docker/internal/tarfile.Source from docker/daemon and docker/archive</li>
<li>Remove deprecated non-SystemContext functions from docker/internal/tarfile</li>
<li>Split docker/internal/tarfile.Reader from Source</li>
<li>Separate tarfile.Reader creation from Source creation</li>
<li>Read the tarfile manifest already when initializing tarfile.Reader</li>
<li>Turn tarfile.Source.LoadTarManifest into a TarManifest</li>
<li>Allow choosing an image from tarfile.Reader by reference</li>
<li>Introduce docker-archive:path:<a href="https://github.com/Index">@Index</a> syntax for reading untagged images</li>
<li>Introduce docker/archive.Reader</li>
<li>Finally, share a tarfile.Reader across archiveSource objects</li>
<li>Add docker/archive.NewReaderForReference</li>
<li>Add docker/archive.Reader.ManifestTagsForReference</li>
<li>Support per user registries.d</li>
<li>Move TestInvalidPolicyFormatError</li>
<li>Reduce duplication in policy_config_test.go</li>
<li>Eliminate more duplication in signature/policy_config_tests.go</li>
<li>Return error body if UnexpectedHTTPResponseError</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="4f7144c652"><code>4f7144c</code></a> v5.6.0</li>
<li><a href="c806115681"><code>c806115</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/containers/image/issues/1044">#1044</a> from containers/dependabot/go_modules/github.com/con...</li>
<li><a href="b3df60ead3"><code>b3df60e</code></a> Bump github.com/containers/storage from 1.23.4 to 1.23.5</li>
<li><a href="18b976011b"><code>18b9760</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/containers/image/issues/1040">#1040</a> from containers/dependabot/go_modules/github.com/con...</li>
<li><a href="a771cba5b4"><code>a771cba</code></a> Bump github.com/containers/storage from 1.23.3 to 1.23.4</li>
<li><a href="6edae75b24"><code>6edae75</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/containers/image/issues/1038">#1038</a> from containers/dependabot/go_modules/github.com/kla...</li>
<li><a href="a9088a36d0"><code>a9088a3</code></a> Bump github.com/klauspost/pgzip from 1.2.4 to 1.2.5</li>
<li><a href="2a714d7108"><code>2a714d7</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/containers/image/issues/1042">#1042</a> from containers/dependabot/go_modules/github.com/kla...</li>
<li><a href="22dea1132d"><code>22dea11</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/containers/image/issues/1039">#1039</a> from QiWang19/untar</li>
<li><a href="1b1d2f6794"><code>1b1d2f6</code></a> Set NoLchown to true in untar opts</li>
<li>Additional commits viewable in <a href="https://github.com/containers/image/compare/v5.5.2...v5.6.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=github.com/containers/image/v5&package-manager=go_modules&previous-version=5.5.2&new-version=5.6.0)](https://dependabot.com/compatibility-score/?dependency-name=github.com/containers/image/v5&package-manager=go_modules&previous-version=5.5.2&new-version=5.6.0)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)



</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-21 21:08:34 +00:00
bors[bot] 0f4a25956b
Merge #2635
2635: Run(): ignore containers.conf's environment configuration r=rhatdan a=nalind

#### What type of PR is this?

/kind bug

#### What this PR does / why we need it:

The hardwired default for containers.conf now includes a TERM variable, and passing it through to commands that we "RUN" during a build can subtly cause the resulting image to be different from one that `docker build` would create, so stop using it there.

When a runtime runs the image we eventually produce, it'll consult the configuration file, so the variable will still be set, even when it isn't set in the image.

#### How to verify it

This change prevents a failure in the `TestConformance/ci-pipeline-modified` conformance test, which checks which variables are set during RUN.

#### Which issue(s) this PR fixes:

None

#### Special notes for your reviewer:

This creates an exception to the "environment variables in containers.conf are used everywhere" rule, but while the conformance test is a pretty harmless example of differences in builds that can result from environment variables being set or not, I wouldn't want to have to debug a build problem that was triggered based on whether or not a variable was set in the configuration.

#### Does this PR introduce a user-facing change?

```
Environment variables set in containers.conf will no longer be set for commands run using `buildah run` or by RUN instructions during `buildah build-using-dockerfile`.
```

Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-21 19:57:36 +00:00
bors[bot] d273b9e1d4
Merge #2636
2636: Add In Progress section to contributing r=rhatdan a=TomSweeneyRedHat

Add an "In Progress" section to the CONTRIBUTING.md
page of Buildah.  Once this is approved, I will open
a similar PR for Podman.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>





Co-authored-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-09-21 19:22:53 +00:00
dependabot-preview[bot] 87c7914f7d
build(deps): bump github.com/containers/image/v5 from 5.5.2 to 5.6.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.5.2 to 5.6.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.5.2...v5.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 15:06:01 -04:00
bors[bot] 411a885adb
Merge #2638
2638: integration tests: make sure tests run in ${topdir}/tests r=TomSweeneyRedHat a=nalind

#### What type of PR is this?

/kind other

#### What this PR does / why we need it:

Add a pushd/popd to setup()/teardown() to ensure that tests run in our tests directory, even if they're not invoked by test_runner.sh, so that we can reliably use relative paths in tests without having to ensure our location on a per-test or per-test-file basis.

#### How to verify it

If you run `bats` directly and point it to either the `tests` directory, or the `add.bats` file within it, the test shouldn't fail for attempting to access a path relative to the current directory which should actually be relative to the `tests` directory.

#### Which issue(s) this PR fixes:

None

#### Special notes for your reviewer:

#### Does this PR introduce a user-facing change?

```
None
```

Co-authored-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-21 17:28:23 +00:00
TomSweeneyRedHat 98e021ef32 Add In Progress section to contributing
Add an "In Progress" section to the CONTRIBUTING.md
page of Buildah.  Once this is approved, I will open
a similar PR for Podman.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-09-18 15:33:27 -04:00
Nalin Dahyabhai 0d9e6aa316 integration tests: make sure tests run in ${topdir}/tests
Add a pushd/popd to setup()/teardown() to ensure that tests run in our
tests directory, even if they're not invoked by test_runner.sh, so that
we can reliably use relative paths in tests without having to ensure our
location on a per-test or per-test-file basis.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-18 10:16:46 -04:00
Nalin Dahyabhai 72e0721b2b Run(): ignore containers.conf's environment configuration
The hardwired default for containers.conf now includes a TERM variable,
and passing it through to commands that we "RUN" during a build can
subtly cause the resulting image to be different from one that `docker
build` would create, so stop using it there.

When a runtime runs the image we eventually produce, it'll consult the
configuration file, so the variable will still be set, even when it
isn't set in the image.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-17 14:43:37 -04:00
Ashley Cui 1ff0071ba0 Warn when setting healthcheck in OCI format
healthcheck only works in Docker format, so when healthcheck is set in OCI format, warn user that it will be discarded

Signed-off-by: Ashley Cui <acui@redhat.com>
2020-09-17 13:42:46 -04:00
bors[bot] 678da1d8e9
Merge #2634
2634: No branch validate r=rhatdan a=cevich

#### What type of PR is this?

> /kind failing-test 

#### What this PR does / why we need it:

Update the vendor git-validate tool due to a bug in it's output processing.  This also required updates to golangci-lint and ginkgo due to dependency issues.

#### How to verify it

Running `bors try` will pass (by skipping the 'gate' job entirely)

#### Which issue(s) this PR fixes:

Many 😢 

#### Special notes for your reviewer:

None

#### Does this PR introduce a user-facing change?

None

Co-authored-by: Valentin Rothberg <rothberg@redhat.com>
Co-authored-by: Chris Evich <cevich@redhat.com>
2020-09-17 16:39:24 +00:00
Daniel J Walsh 58541a36f1
Merge pull request #2630 from nalind/add-relative
Add(): fix handling of relative paths with no ContextDir
2020-09-17 11:22:58 -04:00
Chris Evich 7a1f8a7876
Cirrus: Skip git-validate on branches
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-09-17 10:49:30 -04:00
Valentin Rothberg cf7de42d2f tools: update git-validation to the latest commit
On behalf of @cevich who add fixes for the CI.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-17 15:14:54 +02:00
Valentin Rothberg 4853644e3c tools: update golangci-lint to v1.18.0
Update golangci-lint to v1.18.0.  Purely out of neccessity to get the
tests/tools/go.mod into a working state.  The previous version had a
non-existent dependency which broke all attempts to do anything.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-09-17 15:12:30 +02:00
Daniel J Walsh 17bb22f549
Merge pull request #2615 from containers/dependabot/go_modules/github.com/containers/common-0.22.0
build(deps): bump github.com/containers/common from 0.21.0 to 0.22.0
2020-09-17 09:08:01 -04:00
Daniel J Walsh 123c8313d0
Merge pull request #2624 from rhatdan/mount
Fix buildah mount to display container names not ids
2020-09-17 09:06:54 -04:00
Hironori Shiina 1571a34331 Add a few tests of push command
The following tests are added.
- `--authfile` flag with an existing file
- `--quiet` flag

Signed-off-by: Hironori Shiina <shiina.hironori@fujitsu.com>
2020-09-17 19:45:45 +09:00
Daniel J Walsh 5f74a5f26d
Merge branch 'master' of github.com:containers/buildah into dependabot/go_modules/github.com/containers/common-0.22.0 2020-09-17 06:38:57 -04:00
Nalin Dahyabhai ff8cfe7c3f Add(): fix handling of relative paths with no ContextDir
Add() is supposed to handle relative paths when the ContextDir value
passed to it is not set, but it hasn't been doing that correctly since
it was overhauled.  Correct it to recognize relative paths at the
function start, when ContextDir is not set, by combining them with the
current directory to convert them to absolute paths.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-16 14:19:10 -04:00
Daniel J Walsh 552cbd31d1
Merge pull request #2623 from rhatdan/completions
Improve buildah completions
2020-09-16 08:03:06 -04:00
Daniel J Walsh 2aa4c79825
Merge pull request #2626 from rhatdan/man
Add missing --format option in buildah from man page
2020-09-16 08:02:05 -04:00
Daniel J Walsh d7fb2def26
Merge pull request #2608 from alvistack/master-linux-amd64
Update nix pin with `make nixpkgs`
2020-09-16 07:57:10 -04:00
Daniel J Walsh 7276a6544c
build(deps): bump github.com/containers/common from 0.21.0 to 0.22.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.21.0...v0.22.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-16 07:56:30 -04:00
Daniel J Walsh e4ce08b9be
Merge pull request #2616 from containers/dependabot/go_modules/github.com/openshift/imagebuilder-1.1.7
build(deps): bump github.com/openshift/imagebuilder from 1.1.6 to 1.1.7
2020-09-16 07:54:43 -04:00
Daniel J Walsh ba64ef0e90
Merge pull request #2617 from containers/dependabot/go_modules/github.com/containers/storage-1.23.5
build(deps): bump github.com/containers/storage from 1.23.4 to 1.23.5
2020-09-16 07:54:23 -04:00
Daniel J Walsh a63958d18b
Merge pull request #2625 from cevich/fix_branch_validate
Validate: reference HEAD
2020-09-16 07:54:02 -04:00
Chris Evich a13b1de79f
Lint: Use same linters as podman
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-09-16 07:14:00 -04:00
Chris Evich 4961747e5e
Validate: reference HEAD
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-09-16 06:51:25 -04:00
Daniel J Walsh 94a34115fe
Fix buildah mount to display container names not ids
Currently we are displaying containerid rather then containername,
which is unknown to users.  Users refer to the container names all
of the time, so we should show the mounted containers based on names.

This change eliminates the need for the truncate flag on buildah mount
as well, so this PR hides it.

Fix up the man page documentation to use container names and show
proper output.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Co-authored-by: Sascha Grunert <sgrunert@suse.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-16 06:44:35 -04:00
Wong Hoi Sing Edison f37a7e8f22
Update nix pin with `make nixpkgs`
Also backport changes from https://github.com/cri-o/cri-o/pull/4065/files#diff-1d37e48f9ceff6d8030570cd36286a61R189-R197

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
2020-09-16 07:31:32 +08:00
Tom Sweeney d0f43a0b55
Merge pull request #2610 from rhatdan/codespell
Fix up code based on codespell
2020-09-15 17:46:38 -04:00
Daniel J Walsh c0b8ba5d25
Add missing --format option in buildah from man page
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-15 17:13:56 -04:00
Daniel J Walsh 2cf9c8f2b8
Fix up code based on codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-15 16:49:18 -04:00
dependabot-preview[bot] 8e42964f06
build(deps): bump github.com/openshift/imagebuilder from 1.1.6 to 1.1.7
Bumps [github.com/openshift/imagebuilder](https://github.com/openshift/imagebuilder) from 1.1.6 to 1.1.7.
- [Release notes](https://github.com/openshift/imagebuilder/releases)
- [Commits](https://github.com/openshift/imagebuilder/compare/v1.1.6...v1.1.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-15 16:47:49 -04:00