Commit Graph

795 Commits

Author SHA1 Message Date
dependabot-preview[bot] 2eea661e71 Bump github.com/containers/storage from 1.23.3 to 1.23.4
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.23.3 to 1.23.4.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.23.3...v1.23.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-05 06:19:55 -04:00
OpenShift Merge Robot da920bbbc1 Merge pull request #299 from saschagrunert/unit-test
Add seccomp validation unit test for failing BuildProfile()
2020-08-30 06:20:27 -04:00
Sascha Grunert 328946174a Add seccomp validation unit test for failing BuildProfile()
This tests the last failure branch of the profile validation.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-28 21:35:03 +02:00
Daniel J Walsh 4a0e7ef832 Merge pull request #298 from rhatdan/VERSION
Bump to v0.21.0
2020-08-28 09:44:21 -04:00
Daniel J Walsh 28dc0fae39 Move to v0.21.1-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-28 09:42:51 -04:00
Daniel J Walsh 0adbc1949e Bump to v0.21.0
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-28 09:42:19 -04:00
OpenShift Merge Robot 7c47fd098d Merge pull request #296 from saschagrunert/validate-build-filter
Add BuildFilter() and ValidateProfile() API
2020-08-28 09:38:09 -04:00
OpenShift Merge Robot 85f1358d88 Merge pull request #297 from containers/dependabot/go_modules/github.com/containers/storage-1.23.3
Bump github.com/containers/storage from 1.23.2 to 1.23.3
2020-08-28 06:46:44 -04:00
dependabot-preview[bot] a6436ead85 Bump github.com/containers/storage from 1.23.2 to 1.23.3
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.23.2 to 1.23.3.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.23.2...v1.23.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-28 05:18:01 -04:00
Sascha Grunert 8270dcffb5 Add BuildFilter() and ValidateProfile() API
The new `BuildFilter()` API can be used by runc/libcontainer to build
a libseccomp filter from the spec. This means that they also do not need
any internal structures any more because we indirectly build it from the
internal `Seccomp` type.

The new `ValidateProfile()` API can be used by higher level consumers,
which want to ensure that a seccomp profile string can be transferred
into a libseccomp filter.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-27 21:09:59 +02:00
OpenShift Merge Robot 7bf7bec906 Merge pull request #293 from nalind/retry-delay
RetryIfNecessary: add a field for setting the delay in RetryOptions
2020-08-27 05:17:01 -04:00
OpenShift Merge Robot 0659935ede Merge pull request #276 from openSUSE/containers-golang
Migrate seccomp/containers-golang
2020-08-27 05:13:56 -04:00
OpenShift Merge Robot a19cbe5f81 Merge pull request #291 from openSUSE/gocritic
Fix all gocritic lints
2020-08-27 05:10:38 -04:00
Sascha Grunert 5f1c701c68 Migrate seccomp/containers-golang
This migrates the repository from github.com/seccomp/containers-golang
into this library.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-27 10:15:31 +02:00
Nalin Dahyabhai 386a2fd659 RetryIfNecessary: add a field for setting the delay in RetryOptions
Allow RetryIfNecessary()'s caller to specify the delay between retry
attempts.  If the delay is not set, continue to default to 2 seconds for
the first retry, doubling the delay for every subsequent attempt.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-08-26 15:02:49 -04:00
OpenShift Merge Robot 2a2e5a601e Merge pull request #290 from baude/cirrus
migrate off travis
2020-08-26 04:58:57 -04:00
OpenShift Merge Robot ab4bd84bac Merge pull request #292 from Luap99/fix-windows-conf
fix windows containers.conf path
2020-08-26 04:52:52 -04:00
Paul Holzinger 4abbe16f3b fix windows containers.conf path
customConfigFile() has to return the full path to the file
LOCALAPPDATA only returns a directory.

I also recommend using APPDATA instead of LOCALAPPDATA.
If a domain user would logon to a new computer they would
automatically have their containers.conf from the last
login at a different pc. No manual copy is needed since
windows syncs the APPDATA dir by default in a domain
environment at login.

So the config file path on windows would be:
`C:\Users\<username>\AppData\Roaming\containers\containers.conf`

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-08-25 22:06:13 +02:00
Sascha Grunert 89b399d4cf Fix all gocritic lints
This enables the missing gocritic checks and fixes all of the lints.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-25 20:58:15 +02:00
OpenShift Merge Robot c33cd39910 Merge pull request #284 from containers/dependabot/go_modules/github.com/containers/storage-1.23.2
Bump github.com/containers/storage from 1.23.1 to 1.23.2
2020-08-25 14:55:53 -04:00
Brent Baude a8d90937eb begin migration off travis
we prefer cirrus. initial implementation for containers/common

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-08-25 13:34:31 -05:00
OpenShift Merge Robot 93abcad4da Merge pull request #289 from baude/owners
Add owners file
2020-08-25 13:39:10 -04:00
OpenShift Merge Robot 566fc3aa95 Merge pull request #287 from openSUSE/fmt-errorf
Change fmt.Errorf calls to be replaced by errors package
2020-08-25 13:35:33 -04:00
dependabot-preview[bot] 17342e16dc Bump github.com/containers/storage from 1.23.1 to 1.23.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.23.1 to 1.23.2.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.23.1...v1.23.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-25 13:31:15 -04:00
Brent Baude 07edc1f14d Add owners file
add owners file so that openshift merge bot can do its thing.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-08-25 10:59:53 -05:00
Tom Sweeney a0a02519cf Merge pull request #285 from openSUSE/golangci-lint
Update golangci-lint and add config
2020-08-25 10:43:32 -04:00
OpenShift Merge Robot 6b1a19f14c Merge pull request #286 from openSUSE/elseif
Fix nested elseif
2020-08-25 09:21:00 -04:00
Sascha Grunert b494081304 Change fmt.Errorf calls to be replaced by errors package
We now use wrapped errors instead of indirectly wrapping them by
`fmt.Errorf`. The error messages have also been cleaned-up to reduce
duplicate words like `failed`.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-25 11:37:12 +02:00
Sascha Grunert 0141e99d65 Fix nested elseif
The nested elseif `else {if cond {}}` can be replaced with `else if cond
{}`.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-25 11:31:53 +02:00
Sascha Grunert 7cad87d361 Update golangci-lint and add config
This also updates the target directory of the linter binary, which is
now inside the repository instead of `$GOBIN`.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-25 11:20:54 +02:00
Giuseppe Scrivano 191f631584 Merge pull request #281 from rhatdan/master
getCustomConfigFile for windows and darwin
2020-08-24 14:56:43 +02:00
OpenShift Merge Robot e5ea066b38 Merge pull request #277 from QiWang19/retry-eof
Enable retry EOF from http request
2020-08-23 06:49:15 -04:00
Daniel J Walsh 69012df43d Update pkg/retry/retry.go
Co-authored-by: Miloslav Trmač <mitr@redhat.com>
2020-08-23 06:39:43 -04:00
Daniel J Walsh a288c7cb3a Update pkg/config/config_windows.go
Co-authored-by: Jhon Honce <jhonce@redhat.com>
2020-08-22 09:11:12 -04:00
Daniel J Walsh d208f7340c Update pkg/config/config_darwin.go
Co-authored-by: Jhon Honce <jhonce@redhat.com>
2020-08-22 09:11:12 -04:00
Daniel J Walsh 3bd8ddef5e Update pkg/config/config_linux.go
Co-authored-by: Jhon Honce <jhonce@redhat.com>
2020-08-22 09:11:12 -04:00
Brent Baude 054d133710 getCustomConfigFile for windows and darwin
podman remote clients that run on windows and darwin cannot use the isRootless to determine the configuration file locations.  here we do by OS and also honor the environment variable.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2020-08-22 09:11:12 -04:00
Qi Wang 499c4ef5a7 Enable retry EOF from http request
If the *url.Error type error casued by EOF, enable to retry.

Signed-off-by: Qi Wang <qiwan@redhat.com>
2020-08-20 14:51:50 -04:00
OpenShift Merge Robot 0f5b7db0f3 Merge pull request #269 from openSUSE/apparmor_parser-binary-test
Validate that apparmor_parser is available on the system
2020-08-20 12:33:20 +02:00
Sascha Grunert b1670784f9 Add FindAppArmorParserBinary() helper
This function will be now used internally to get the correct path to the
`apparmor_parser` binary.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-20 09:22:27 +02:00
OpenShift Merge Robot 0521a88a1f Merge pull request #272 from containers/dependabot/go_modules/github.com/containers/image/v5-5.5.2
Bump github.com/containers/image/v5 from 5.5.1 to 5.5.2
2020-08-19 21:34:20 +02:00
Daniel J Walsh 643de8e65c Bump github.com/containers/image/v5 from 5.5.1 to 5.5.2
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.5.1 to 5.5.2.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](containers/image@v5.5.1...v5.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-19 13:02:05 -04:00
OpenShift Merge Robot 0bb4daecae Merge pull request #273 from ptalbert/syntax_fix
containers.conf: Fix ulimits nofile example syntax
2020-08-19 16:16:24 +02:00
OpenShift Merge Robot 5c5cc438e4 Merge pull request #271 from containers/dependabot/go_modules/github.com/containers/storage-1.23.1
Bump github.com/containers/storage from 1.23.0 to 1.23.1
2020-08-19 16:05:07 +02:00
Daniel J Walsh d06113ccc6 Bump github.com/containers/storage from 1.23.0 to 1.23.1
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.23.0 to 1.23.1.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.23.0...v1.23.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-19 08:59:20 -04:00
Patrick Talbert a8f80c4107 containers.conf: Fix ulimits nofile example syntax
Uncommenting the nofile example will result in a syntax error as there are extra
quote (") characters. Remove them.

Fixes: b406a112 ("Add new fields to containers.conf")
Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
2020-08-19 14:16:08 +02:00
OpenShift Merge Robot d3be6cac65 Merge pull request #259 from openSUSE/go-1.15
Bump golang to 1.15
2020-08-19 12:16:23 +02:00
Sascha Grunert fa66b56024 Add mock'able unit tests and move package to `internal`
This adds internal strucutres and fakes to be able to mock the former
`isSupproted` function.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-19 10:19:01 +02:00
Sascha Grunert 29747623fd Validate that apparmor_parser is available on the system
If AppArmor is enabled, then we now check if the `apparmor_parser`
binary is either in `/sbin` or in `$PATH`.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-19 09:29:13 +02:00
Daniel J Walsh 87c67dcdbb Merge pull request #268 from rhatdan/TERM
Bump to v0.20.3
2020-08-18 14:22:00 -04:00